At a glance
| Model | ESM-2 (t6, 8M params) — Meta's protein language model |
|---|---|
| Task | fill-mask over amino acids (a protein language model, not natural language) |
| Runtime | transformers.js — run low-level (AutoModelForMaskedLM), placing the mask ourselves |
| Alphabet | the 20 standard amino acids (A C D E F G H I K L M N P Q R S T V W Y) |
| Predict | mask a residue → probability over the 20 amino acids at that position |
| Conserve | mask each position → the model's confidence in the true residue (a conservation map) |
| Quantization | q8 (model_quantized.onnx) — ~8 MB, runs on the plain WASM backend |
| License | MIT (facebook/esm2_t6_8M_UR50D) — the weights stay MIT wherever converted |
| Web APIs | WebAssembly, Web Workers — all Baseline widely available |
Read a protein
Click any residue to mask it and see the model's prediction.
A different language
ESM-2 is a masked language model like BERT, but its vocabulary is the 20 amino acids instead of words. By learning to fill in masked residues across millions of natural proteins, it internalises which substitutions proteins tolerate — so a masked conserved position (structurally or functionally critical) is predicted confidently, while a flexible one is uncertain. That signal is what larger ESM models turn into structure and mutation-effect predictions. Everything runs locally.
Use-case ladder
Basics · Masked-Residue & Amino-Acid Biochemistry Lab
Place <mask> on any residue in an interactive ribbon to inspect all 20 canonical amino-acid probabilities grouped by biochemistry, wild-type rank, Shannon entropy, and the underlying worker code.
Practical · Deep Mutational Scanning (DMS) Variant Effect Heatmap
Scan a window across hemoglobin β (E6V), insulin, GFP, or your own FASTA to compute an interactive L × 20 log-likelihood ratio heatmap with per-variant inspection and CSV/JSON export.
Wild · In-Silico Directed Evolution & Sequence Optimizer
Start from a damaged peptide and run iterative ESM-2 optimization rounds with greedy or temperature-sampled edits, watching the live pseudo-log-likelihood fitness curve, residue diff, and biochemical profile evolve.
Multi-model · ESM-2 8M vs ESM-2 35M Scaling-Law Comparator
Run the exact same masked site and point mutation through both 6-layer 8M (~8 MB) and 12-layer 35M (~35 MB) ESM-2 models side-by-side to compare LLR deltas, KL divergence, Spearman rank correlation, and latency.