FAIR ESM provides pretrained transformer language models for proteins, including ESM-2 and ESM-1b. Version 2.0.0 adds new models and enhancements. The library is actively maintained by Meta AI.
pip install fair-esmVerified import paths — ran on the pinned version, not inferred.
Load an ESM-2 model, tokenize sequences, and extract representations.
Use from esm.pretrained import ... instead of torch.hub.load('facebookresearch/esm', ...)Refer to the model zoo documentation for updated model names.
Use esm2_t33_650M_UR50D (650M params) for typical usage.
Set return_contacts=False (default) unless you need attention map.
Use esm.pretrained for model loading and esm for Alphabet.
No dependency data recorded yet.