use case · multi-model · ESM-2 8M (~8 MB) ↔ ESM-2 35M (~35 MB) · WASM · ~43 MB total

ESM-2 8M vs ESM-2 35M Scaling-Law Comparator

What changes when you scale a protein language model 4.4× in parameters and 2× in depth (from 6 layers / 320-dim to 12 layers / 480-dim)? Load both ESM-2 8M and ESM-2 35M in isolated Web Workers — reusing the existing protein-mutation-oracle worker with zero weight duplication — and score the exact same masked site & point mutation side-by-side to inspect LLR deltas, KL divergence, Spearman rank correlation, and inference latency.

1 · Two isolated ESM-2 workers (~43 MB combined)

Stage 1 · ESM-2 t6 8M (~8 MB q8)

6 transformer layers, 320 hidden dim (Xenova/esm2_t6_8M_UR50D) via ../worker.js.

Stage 2 · ESM-2 t12 35M (~35 MB q8)

12 transformer layers, 480 hidden dim (Xenova/esm2_t12_35M_UR50D) via ../../protein-mutation-oracle/worker.js.

Prepare both ESM-2 8M and ESM-2 35M above to compare their distributions side-by-side.

2 · Sequence, masked site & target point mutation

3 · Scaling-law metrics & 20-amino-acid distribution delta

Target variant LLR (8M vs 35M)–
LLR shift Δ(35M − 8M)–
KL divergence D_KL(35M ‖ 8M)–
Spearman ρ / Pearson r–
Entropy (8M → 35M)–
Latency (8M vs 35M)–

LLR Scaling Scatter Plot (8M vs 35M)

Every dot is one of the 20 amino acids plotted at (LLR₈ₘ, LLR₃₅ₘ). Points below the dashed y = x diagonal are penalized more sharply by the 12-layer 35M model than by the 6-layer 8M model.

All substitutions Wild-type (0, 0) Selected mutation

Top-1 & Wild-Type Summary

Site & Variant–
ESM-2 8M Top-1–
ESM-2 35M Top-1–
Wild-Type Rank–
Reverse KL D_KL(8M ‖ 35M)–
Runtime & QuantWASM · q8 (both models)

All 20 canonical amino acids — side-by-side distribution

ESM-2 8M (6 layers) ESM-2 35M (12 layers)
AA Group 8M % 35M % Paired distribution LLR 8M LLR 35M ΔLLR
Run a comparison to inspect all 20 amino acids side-by-side.