← All models

protein language model · biology · WASM · ~8 MB

Protein language model (ESM-2)

The built fill-mask demos predict the missing word in a sentence. ESM-2 does the same for a different language entirely — proteins. Trained on millions of sequences, it predicts which amino acid belongs at a position, having learned the grammar of real proteins. It's the family behind structure prediction (ESMFold) and variant-effect scoring. Click a residue to see what it predicts, or scan a whole protein to map which positions are conserved. Runs entirely on your device.

At a glance

ModelESM-2 (t6, 8M params) — Meta's protein language model
Taskfill-mask over amino acids (a protein language model, not natural language)
Runtimetransformers.js — run low-level (AutoModelForMaskedLM), placing the mask ourselves
Alphabetthe 20 standard amino acids (A C D E F G H I K L M N P Q R S T V W Y)
Predictmask a residue → probability over the 20 amino acids at that position
Conservemask each position → the model's confidence in the true residue (a conservation map)
Quantizationq8 (model_quantized.onnx) — ~8 MB, runs on the plain WASM backend
LicenseMIT (facebook/esm2_t6_8M_UR50D) — the weights stay MIT wherever converted
Web APIsWebAssembly, Web Workers — all Baseline widely available

Read a protein

variable conserved

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