facebookresearch / esm

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

Why the inpu size of embedding is 33? #679

Open fulacse opened 2 months ago

fulacse commented 2 months ago

I want do transfer leaning with the embedding. So I need the vocabulary to token table. Thanks!

garykbrixi commented 1 month ago

The token table can be accessed from the Alphabet object. Try alphabet.to_dict()

https://github.com/facebookresearch/esm/blob/2b369911bb5b4b0dda914521b9475cad1656b2ac/esm/data.py#L133C2-L134C38