Open Haonan917 opened 1 year ago
Hi, thank you for the question! Currently, the pretraining code is in the dev-temp
branch. You may also find a training script here https://github.com/bowang-lab/scGPT/blob/dev-temp/examples/pretrain.py , which will guide through the process. For the usage of the attention mask for generation in inference, we'll release a specific tutorial for cell generation soon.
This is great to hear. In addition to pretrain.py
, would you be able to provide a slice of dataset to test the pertaining script? @subercui
@subercui Is the generative pretraining attention mask used in this script? I'm unable to locate where it's implemented in this branch. If I'm following the code correctly, the generative_forward
function essentially uses the forward function of this class: https://github.com/bowang-lab/scGPT/blob/dev-temp/scgpt/model/flash_layers.py#L389 , but there doesn't seem to be anything special going on here.
Maybe I don't understand the masking procedure? I thought the attention mask needs to be generated on the fly, so I'm searching for a forward function that loops and unmasks genes based on likelihood scores or something similar. Is this not how it works?
Hi @DanielFLevine,
I've come to the same conclusion as yours. Have you been able to figure this out since then ? Thanks in advance !
Thank you for your great work! But it seems that the latest code didn't implement your special design of attention mask during pre-train?