Basics · 20-AA Biochemical Log-Odds, Active-Site Conservation & Capacity Scaling · 151.64 MB WASM q8 · MIT

Inside ESM-2 150M: 20-AA Log-Odds & Active-Site Entropy

Mask any residue in facebook/esm2_t30_150M_UR50D (Xenova/esm2_t30_150M_UR50D, 151.64 MB WASM q8, MIT) to inspect all 20 canonical amino-acid log-odds grouped by side-chain chemistry, contrast conserved catalytic/disulfide active sites against flexible loops, and examine how ESM-2 scales from 6 layers (8M) to 30 layers (150M).

Log-Odds & Conservation Entropy: At a masked wild-type residue wt, ESM-2 scores every amino acid a via masked-marginal log-odds LLR(a) = ln P(a) - ln P(wt) and Shannon entropy H = -Σ P(a) log2 P(a) over the 20 canonical amino acids (0 bits = absolute evolutionary certainty; 4.32 bits = uniform).

1. 20 Canonical Amino-Acid Biochemical Log-Odds Lab

Selected site–
Top-1 / WT rank–
P(WT)–
20-AA Entropy H–
Conservation (1-H/Hmax)–
NaN / Latency–
All 20 canonical amino-acid probabilities, raw logits, and masked-marginal log-odds grouped by side-chain chemistry
AA Chemistry Group Prob Raw Logit LLR vs WT Variant Tier
Initialize ESM-2 150M above to inspect all 20 canonical amino acids.

2. Active-Site vs Flexible-Loop Conservation Entropy

Measure Shannon entropy directly across catalytic/disulfide active-site positions versus flexible surface positions in Ubiquitin, Insulin B-chain, and Lysozyme.

Active-site mean H–
Flexible-site mean H–
Entropy gap (Flex - Active)–
Mean active P(WT)–
Scan latency–
Active-site versus flexible-loop conservation entropy and wild-type probability
Site Biological Role Class Top-1 P(WT) Entropy H Conservation
Click "Scan Active vs Flexible Sites Live" above after the model is ready.

3. ESM-2 Capacity Scaling: 8M (6L) → 35M (12L) → 150M (30L)

Verified config.json architectures across the browser-runnable ESM-2 ladder (all share 20 attention heads, vocab_size: 33, and max_position_embeddings: 1026). Run live side-by-side 8M vs 150M inference on the Multi-model Comparator.

ESM-2 8M, 35M, and 150M architectural parameters and WASM q8 artifact sizes
Model Tier HF Upstream Layers Heads Hidden / FFN Params WASM q8 Size

4. Inspect Entropy Math & Multi-Site Worker Scanner

Show the code · esm2-150m-core.mjs — computeEntropy()
Show the code · worker.js — runScanPositions()