| name | esm |
| description | ESM protein language models for embeddings, sequence scoring, structure prediction, and binder design. Use this skill when: (1) Computing pseudo-log-likelihood (PLL) or mutation-effect scores, (2) Getting protein embeddings for clustering or filtering, (3) Predicting complex structures with ESMFold2, (4) Designing binders by inverting ESMFold2, (5) Filtering designs by sequence plausibility.
For diffusion-based structure prediction, use boltz or chai. For QC thresholds, use protein-qc. For gradient-based multi-objective design, use mosaic.
|
| license | MIT |
| category | design-tools |
| tags | ["sequence-design","embeddings","scoring","structure-prediction","binder"] |
| proteinbase_slug | esm2-optimization |
| proteinbase_url | https://proteinbase.com/design-methods/esm2-optimization |
| biomodals_script | modal_esm2_predict_masked.py |
ESM Protein Language Models
The ESM line is maintained at github.com/Biohub/esm
(Chan Zuckerberg Biohub, MIT license; the older evolutionaryscale/esm URL
redirects here). The current generation ships three artifacts: ESM C (language
model), ESMFold2 (structure prediction), and ESM Atlas (a map of predicted
structures). Weights are on huggingface.co/biohub;
the hosted API is at biohub.ai.
This skill covers ESM C, ESMFold2, and legacy ESM2. ESM3 is not covered because its
open weights are non-commercial.
Which model to use
| Task | Model |
|---|
| Embeddings, PLL, mutation scoring | ESM C (ESMC-6B), or ESM2 for a lighter run |
| Complex structure prediction | ESMFold2 |
| High-throughput single-sequence folding | ESMFold2 fast mode |
| Binder design | ESMFold2 inversion (see below), or the mosaic / bindcraft skills |
| Variant effect / zero-shot scoring | ESM C or ESM2 |
Prerequisites
| Requirement | Minimum | Recommended |
|---|
| Python | 3.10+ | 3.11 |
| PyTorch | 2.0+ | Latest |
| CUDA | 12.0+ | 12.1+ |
| GPU VRAM | 24GB (ESM2 / small ESMC) | 80GB (ESMC-6B, ESMFold2) |
ESM C: embeddings and scoring
ESM C is the successor to ESM2. It improves long-range structural understanding as
model scale grows and is the default choice for embeddings, pseudo-log-likelihood,
and mutation-effect scoring.
Python (Hugging Face)
from transformers import AutoModelForMaskedLM, AutoTokenizer
import torch
model_id = "biohub/ESMC-6B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(
model_id, output_hidden_states=True, torch_dtype=torch.bfloat16
).().cuda()
batch = tok([], return_tensors=).to()
torch.no_grad():
out = model(**batch)
logits = out.logits
embeddings = out.hidden_states[-]