How to use mutiple GPUs to do perturbation?

#412
by ZYSK-huggingface - opened

Hi !

Could you please tell me how to use mutiple GPUs to run insilico? I wanted to load 95M model and run delete insilico but found memory not enough. The problem is it semms that traditional methods like torch.nn.DataParallel(model) need a model loaded, however, here 95M model is in a file catalog, and when using insilico we just set the parameters and tell the location of the model, is there any code that could allow model and data insilico in mulitiple GPUs? Thank you!

Thank you for your question. The in silico perturbation is inference-only so you could reduce batch size to what fits and if it works then you can run parallel separate processes on however many GPUs you have. If not even a batch size of 1 fits then you may consider parallelizing the model to leave more room but we do not have code already established for that purpose. If you do write such code you are welcome to contribute to the repository with a pull request! Please also ensure you are using the current in silico perturbation as there were some recent updates to reduce memory requirements.

ctheodoris changed discussion status to closed

Sign up or log in to comment