evolutionaryscale / esm

Other
1.1k stars 120 forks source link

way to use ESM3 like ESM2. #33

Closed rokieplayer20 closed 1 month ago

rokieplayer20 commented 2 months ago

Thank you for the great model.

Like ESM2 (https://huggingface.co/facebook/esm2_t6_8M_UR50D), I want to input the protein sequence and turn it into a token and then obtain a tensor (batch size, tokens, channel).

Does the module used like ESM2 have not been released yet? If there is a way, I would appreciate it if you could show me an example.

young-su-ko commented 2 months ago

See #2 , I don't know if you can get embeddings in batches but it works for processing one sequence at a time.

ebetica commented 1 month ago

You might be able to use the raw forward function to accomplish this: https://github.com/evolutionaryscale/esm/blob/main/examples/seqfun_struct.py