Standing
The scaling study that made masked protein language models a standard component. Later work initialises other models from ESM-2 weights and uses its embeddings as features.
A bidirectional transformer trained to reconstruct masked amino acids from unaligned sequences. It produces contextual per-residue representations and amino-acid logits. Converting those representations into coordinates requires ESMFold, which is a separate model.
A model that was trained by hiding amino acids and guessing them back. Doing that well forces it to learn what each position in a protein is for, and those internal numbers turn out to be useful for almost any protein task.
Fill in the blanks, ten billion times, until you cannot help but understand the grammar. Nobody taught it chemistry. It learned which residues belong together by being asked to guess them.
It does not predict structure. It produces vectors. ESMFold is the model that turns those vectors into coordinates, and it is a separate download.
import torch
from transformers import AutoTokenizer, AutoModel
name = "facebook/esm2_t33_650M_UR50D"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModel.from_pretrained(name).eval()
seq = "MALWMRLLPLLALLALWGPDPAAA"
batch = tok(seq, return_tensors="pt")
with torch.no_grad():
out = model(**batch).last_hidden_state
# drop the start and end tokens, then average over residues
per_residue = out[0, 1:-1]
sequence_vector = per_residue.mean(0)
print(per_residue.shape, sequence_vector.shape)These snippets have not been executed here. Versions move; check the model card before trusting a line of it.
The scaling study that made masked protein language models a standard component. Later work initialises other models from ESM-2 weights and uses its embeddings as features.
It is an encoder. It does not generate structures, and its per-residue logits are a poor proxy for fitness in cases where function depends on more than sequence likelihood.
| Repository | Size | Licence | Note |
|---|---|---|---|
| facebook/esm2_t33_650M_UR50D | 650M | MIT | The default choice for embeddings |
| facebook/esm2_t12_35M_UR50D | 35M | MIT | Small enough for a laptop |
| facebook/esm2_t36_3B_UR50D | 3B | MIT | — |
| facebook/esm2_t48_15B_UR50D | 15B | MIT | Rarely worth the memory over 3B |
Sequence, structure and function as one masked prediction.
A generative masked model over three parallel tracks.
Explore the architecture Protein language model2026The representation line, scaled further.
A transformer encoder with pre-layer-norm, rotary embeddings and SwiGLU activations, trained on sequences from UniRef, MGnify and the Joint Genome Institute clustered at 70 percent identity.
Read the entry Protein language model2022The encoders that were there first.
A family of transformers trained on UniRef and BFD with the objectives of their text counterparts.
Read the entry