All models

esm2_token_classification

A BERT-style encoder trained on protein sequences with masked language modeling.

Molecules, proteins and genomics · 336 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (32 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
ESM-2
Parameters
7.4M
Operations
336
Framework
PyTorch
Recurrent
No
Published
2022, Science
Cited by
5,562 (as of 29 October 2026)
Authors
Zeming Lin, Halil Akin, Roshan Rao and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m4737
Graph hash
8be32f3f28c5647016ba9af84c9cada9e971e20789a09dd98fe8c720e5215735
Skeleton hash
b5568be20f6a6554ad7c9760bcc704fc215f839cd7fbca3dd7f2a3773bdbe6e7
Architecture hash
826b597f3ec61076676c6403e63e29358021d77716009f158eb06a9e20800ec2
Diagram SHA-256
ce6cb0a02ba9a04e5c8aa3d764eb3c038f5d9b775ba61f6bb3c80a747304daac
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model puts a token-classification head on ESM-2, which its model card describes as suitable for fine-tuning on a wide range of tasks that take protein sequences as input.

About this model's family

ESM-2 is a family of Transformer protein language models, which the paper trains at scales from 8 million up to 15 billion parameters. The models are trained with masked language modeling: they predict the identity of randomly selected amino acids in a protein sequence from their context in the rest of the sequence.

The architecture is a BERT-style encoder-only Transformer with modifications. The number of layers, the number of attention heads and the hidden sizes change with model scale. Where the earlier ESM-1b used a learned positional encoding, ESM-2 uses Rotary Position Embedding so that the model can extrapolate beyond the context window it was trained on.

The paper's central finding is that as the language models are scaled they learn information that enables prediction of a protein's three-dimensional structure at the resolution of individual atoms. That finding is the basis of ESMFold, a single-sequence structure predictor built by training a folding head for ESM-2. On unsupervised contact prediction, the paper reports that the 150M parameter ESM-2 model is comparable to the 650M parameter ESM-1b model.

Key idea. The paper shows that protein language models, scaled up to 15B parameters, learn enough about structure to predict it at atomic resolution directly from a single sequence.

  • ESM-2
  • ESM
  • ESM-1b
  • protein language model
  • evolutionary scale modeling
  • protein structure prediction
  • masked language modeling
  • protein embeddings

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Lin_2022, title={Evolutionary-scale prediction of atomic level protein structure with a language model}, url={http://dx.doi.org/10.1101/2022.07.20.500902}, DOI={10.1101/2022.07.20.500902}, publisher={openRxiv}, author={Lin, Zeming and Akin, Halil and Rao, Roshan and Hie, Brian and Zhu, Zhongkai and Lu, Wenting and Smetanin, Nikita and Verkuil, Robert and Kabeli, Ori and Shmueli, Yaniv and dos Santos Costa, Allan and Fazel-Zarandi, Maryam and Sercu, Tom and Candido, Salvatore and Rives, Alexander}, year={2022}, month=July }