ESM-2 (Evolutionary Scale Modeling 2) is a large-scale transformer protein language model developed by Meta AI that learns biological properties directly from raw amino acid sequences. Trained using a masked language modeling objective on the UniRef50 database containing millions of diverse protein sequences, ESM-2 captures deep evolutionary, structural, and functional information within its learned representations without requiring multiple sequence alignments.
Glossary
ESM-2

What is ESM-2?
ESM-2 is a state-of-the-art protein language model from Meta AI that uses masked language modeling on millions of protein sequences to generate embeddings and predict structure, function, and variant effects.
The model generates rich protein embeddings that encode biophysical properties, enabling state-of-the-art performance on downstream tasks including zero-shot variant effect prediction, secondary structure assignment, and contact prediction. ESM-2's architecture scales to 15 billion parameters, with larger variants demonstrating emergent atomic-resolution structure prediction capabilities that approach the accuracy of dedicated folding models.
Key Features of ESM-2
Meta AI's ESM-2 is a family of large-scale protein language models that uses masked language modeling on millions of evolutionary diverse sequences to learn deep representations of protein structure and function without requiring multiple sequence alignments.
Scale and Architecture
ESM-2 scales up to 15 billion parameters (ESM-2 15B), making it one of the largest protein language models available. It uses a standard transformer encoder architecture with rotary position embeddings and FlashAttention for efficient training.
- ESM-2 8M: 8 million parameters, 320 hidden dimensions, 6 layers
- ESM-2 35M: 35 million parameters, 480 hidden dimensions, 12 layers
- ESM-2 150M: 150 million parameters, 640 hidden dimensions, 30 layers
- ESM-2 650M: 650 million parameters, 1280 hidden dimensions, 33 layers
- ESM-2 3B: 3 billion parameters, 2560 hidden dimensions, 36 layers
- ESM-2 15B: 15 billion parameters, 5120 hidden dimensions, 48 layers
Training Data: UniRef50
ESM-2 is pre-trained on UniRef50, a clustered version of the UniProt database that groups sequences at 50% sequence identity to reduce redundancy while preserving evolutionary diversity. This dataset contains over 65 million protein sequences spanning all domains of life.
- Eliminates over-representation of highly similar sequences
- Preserves diverse evolutionary signals across protein families
- Enables the model to learn generalizable representations rather than memorizing near-duplicates
Masked Language Modeling Objective
ESM-2 uses the masked language modeling (MLM) pre-training objective, where random amino acid residues in a sequence are masked and the model must predict the original residue from the surrounding context.
- Masking rate: 15% of residues are randomly selected
- Replacement strategy: 80% masked token, 10% random amino acid, 10% unchanged
- Forces the model to learn bidirectional context and residue-residue dependencies
- Enables zero-shot variant effect prediction by comparing likelihoods of wild-type vs. mutant sequences
Structure Emerges from Scale
A landmark finding of ESM-2 is that protein structure prediction emerges naturally as model scale increases. The 15B parameter model achieves atomic-resolution structure prediction using only a linear projection on top of internal representations, without any explicit structural supervision.
- Internal attention maps correspond to contact maps of the folded protein
- The model learns to represent 3D structure implicitly through sequence patterns alone
- Enables single-sequence structure prediction without requiring multiple sequence alignments (MSAs)
- Achieves competitive accuracy with MSA-dependent methods like AlphaFold2 at significantly faster inference speeds
Zero-Shot Variant Effect Prediction
ESM-2 can predict the functional impact of amino acid mutations without any task-specific training. By scoring the log-likelihood ratio between the wild-type and mutant sequences, the model identifies deleterious mutations.
- Scoring formula: log P(mutant) - log P(wild-type) summed across the mutated position and its context window
- Correlates strongly with experimental deep mutational scan data across dozens of proteins
- Enables rapid in silico mutagenesis for protein engineering and clinical variant interpretation
- Particularly effective for identifying loss-of-function and pathogenic variants
Embedding Representations
ESM-2 produces per-residue embeddings that capture structural, functional, and evolutionary properties of each amino acid position. These embeddings serve as powerful features for downstream prediction tasks.
- Residue-level embeddings: Vector representations for each position in the input sequence
- Sequence-level embeddings: Aggregated representations (mean pooling or CLS token) for whole-protein tasks
- Applications include:
- Secondary structure prediction (Q3 accuracy > 85%)
- Subcellular localization prediction
- Enzyme Commission number classification
- Gene Ontology term annotation
- Protein-protein interaction prediction
Frequently Asked Questions
Direct answers to the most common technical questions about Meta AI's Evolutionary Scale Modeling transformer, covering its architecture, training methodology, and practical applications in protein engineering.
ESM-2 is Meta AI's second-generation Evolutionary Scale Modeling transformer, a protein language model trained via masked language modeling on millions of protein sequences. The primary architectural advancement over ESM-1b is the incorporation of rotary position embeddings (RoPE), which improve the model's ability to generalize to sequences of varying lengths. ESM-2 was released in a family of scales ranging from 8 million to 15 billion parameters, with the ESM-2 15B variant achieving state-of-the-art performance on structure prediction without requiring multiple sequence alignments. Unlike ESM-1b, which used learned absolute position embeddings, ESM-2's RoPE encoding enables the attention mechanism to capture relative positional relationships more effectively, leading to superior contact prediction and tertiary structure inference directly from single sequences.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
ESM-2 vs. Other Protein Language Models
Architectural and performance comparison of ESM-2 against leading protein language models for representation learning and variant effect prediction.
| Feature | ESM-2 (15B) | ProtBERT | ProGen2 (6.4B) | |
|---|---|---|---|---|
Architecture | Bidirectional Transformer (Encoder) | Bidirectional Transformer (Encoder) | Autoregressive Transformer (Decoder) | |
Pre-training Objective | Masked Language Modeling | Masked Language Modeling | Autoregressive Language Modeling | |
Training Data | UniRef50 (60M sequences) | UniRef100 (216M sequences) | UniRef90 + Pfam (1B+ sequences) | |
Max Sequence Length | 1024 residues | 512 residues | 2048 residues | |
Attention Mechanism | Rotary Position Embeddings | Absolute Position Embeddings | Rotary Position Embeddings | |
Zero-shot Variant Effect Prediction | ||||
Structure Prediction from Sequence | ||||
Generative Design Capability | ||||
Contact Prediction AUC | 0.91 | 0.72 | ||
Open Source Weights |
Applications of ESM-2
ESM-2's learned representations of protein space enable a wide range of downstream tasks without task-specific training, from predicting the effects of mutations to designing novel enzymes.
Zero-Shot Variant Effect Prediction
ESM-2 excels at predicting the functional impact of amino acid substitutions without any fine-tuning. By comparing the log-likelihood of the wild-type sequence against the mutated sequence using the masked language modeling objective, the model scores the deleteriousness of a variant. This approach rivals supervised methods like Deep Mutational Scan (DMS) correlations, achieving state-of-the-art performance on clinical variant databases such as ClinVar. The method is particularly powerful for rare disease diagnosis and interpreting variants of uncertain significance (VUS) in human genetics.
Enzyme Function Annotation
ESM-2 embeddings encode functional properties that enable accurate prediction of Enzyme Commission (EC) numbers and Gene Ontology (GO) terms. By training lightweight linear probes or shallow classifiers on top of frozen ESM-2 representations, researchers can annotate uncharacterized proteins in newly sequenced genomes. This is critical for biodiscovery pipelines searching for novel PETases, cellulases, or other industrially relevant biocatalysts in environmental metagenomes.
Subcellular Localization Prediction
The contextual embeddings from ESM-2 capture signal peptides, transmembrane helices, and other localization motifs. A simple classifier trained on these representations can determine whether a protein is destined for the mitochondria, endoplasmic reticulum, nucleus, or extracellular space. This application is essential for drug target identification, as the therapeutic tractability of a target depends heavily on its cellular compartment.
Protein Solubility and Thermostability Engineering
ESM-2 embeddings can be used to predict developability attributes critical for biologic drug manufacturing and industrial enzyme design. Models trained on experimental solubility and thermostability data using ESM-2 representations guide the engineering of proteins with improved expression yields and resistance to aggregation. This reduces the experimental burden in directed evolution campaigns by prioritizing variants with favorable biophysical profiles.
Semantic Mutagenesis for Protein Design
By navigating the latent space of ESM-2, researchers perform semantic mutagenesis—generating novel protein sequences with altered properties by interpolating between or perturbing learned representations. This technique allows the exploration of the fitness landscape beyond natural sequences, generating functional variants that retain structural integrity while introducing desired modifications. It is a foundational method for de novo protein design and functional diversification.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us