facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.29k stars 644 forks source link

esm2 with .csv files #544

Closed nayeemmz closed 1 year ago

nayeemmz commented 1 year ago

Hi, I am trying to run python predict.py \ --model-location esm1v_t33_650M_UR90S_1 esm1v_t33_650M_UR90S_2 esm1v_t33_650M_UR90S_3 esm1v_t33_650M_UR90S_4 esm1v_t33_650M_UR90S_5 \ --sequence HPETLVKVKDAEDQLGARVGYIELDLNSGKILESFRPEERFPMMSTFKVLLCGAVLSRVDAGQEQLGRRIHYSQNDLVEYSPVTEKHLTDGMTVRELCSAAITMSDNTAANLLLTTIGGPKELTAFLHNMGDHVTRLDRWEPELNEAIPNDERDTTMPAAMATTLRKLLTGELLTLASRQQLIDWMEADKVAGPLLRSALPAGWFIADKSGAGERGSRGIIAALGPDGKPSRIVVIYTTGSQATMDERNRQIAEIGASLIKHW \ --dms-input ./data/BLAT_ECOLX_Ranganathan2015.csv \ --mutation-col mutant \ --dms-output ./data/BLAT_ECOLX_Ranganathan2015_labeled.csv \ --offset-idx 24 \ --scoring-strategy wt-marginals

code using esm2_t48_15B_UR50D() and other esm2 models instead of the esm1 models. However, the program terminates without finishing. I should mention that the code runs fine with esm1 models and I have downloaded esm2 models. Even cloned esm repository locally to see if that would help. Is it that esm2 needs to be run only with fasta and .pdb files?

mdlakic commented 1 year ago

In model names, third part of the string (ends in M or B) tells you about the number of parameters. In simple terms, it correlates with model size. All those esm1v_t33_650M_UR90S models have 650 million parameters, while esm2_t48_15B_UR50D has 15 billion parameters. I don't know the exact GPU memory requirement for that model, but it might be 40Gb+. You may be able to run esm2_t33_650M_UR50D, and it isn't a significant difference in terms of accuracy from that model to esm2_t36_3B_UR50D or esm2_t48_15B_UR50D.

nayeemmz commented 1 year ago

Thanks for the response. I knew about the number of parameters in each model, didn't pay attention to the possibility of that being the issue of concern here. Thanks for pointing it out. I think that is probably the case. I will test it out and update here.

nayeemmz commented 1 year ago

You're right I confirmed that it is a GPU memory issue.