esm icon indicating copy to clipboard operation
esm copied to clipboard

How does ESMC implement encoding proteins in a local computer, that is, converting sequences into arrays?

Open ht-234 opened this issue 11 months ago • 4 comments

Dear all, is there any tutorial that can be provided, thanks a lot. According to the official documentation, I try to use the following code but it always gives me an error saying: in _tokenize assert pad is not None

`from esm.models.esmc import ESMC from esm.sdk.api import ESMProtein, LogitsConfig

protein = ESMProtein(sequence="AAAAA") client = ESMC.from_pretrained("esmc_300m").to("cpu") # or "cpu" protein_tensor = client.encode(protein) logits_output = client.logits( protein_tensor, LogitsConfig(sequence=True, return_embeddings=True) ) print(logits_output.logits, logits_output.embeddings)`

ht-234 avatar Jan 23 '25 03:01 ht-234

I finally figured out why, the environment wasn't set up right, and following the instructions on hugging face to download tags.

  • biology
  • esm
  • protein Special thanks to all of you who read my question, thanks!

ht-234 avatar Jan 23 '25 08:01 ht-234

Hello, excuse me, how did you implement ESMC in a local computer? Can the parameters be downloaded locally?

xtzhang-AI4S avatar Jan 30 '25 14:01 xtzhang-AI4S

Hello, excuse me, how did you implement ESMC in a local computer? Can the parameters be downloaded locally?

Yes. You can check this page.

lzygitk7 avatar Feb 02 '25 12:02 lzygitk7

您好,您是如何在本地计算机中实施 ESMC 的?参数可以在本地下载吗?

Yes. The key to solving this problem is to configure the environment and download the various packages needed.

ht-234 avatar Feb 06 '25 00:02 ht-234