facebook/esm2_t30_150M_UR50D
Xenova/esm2_t30_150M_UR50D
fill-mask (EsmForMaskedLM)
esm2_t30_150M_UR50D captures long-range tertiary contacts, disulfide bridges,
and catalytic active sites across up to 1024 residues (1026 tokens with
<cls> and <eos>). Click any residue tile or type
<mask> directly below.
1. Protein <mask> Cloze Workbench
Pick a UniProt-grounded preset (including the exact HF card Ubiquitin widget), click a residue in
the interactive ribbon, or drop/paste a FASTA/text sequence with <mask>:
.fasta, .fa, .txt, .csv, or
.json file here, or press Ctrl/Cmd+V outside editable inputs. Up to
1024 residues fit inside max_position_embeddings: 1026.
Amino-Acid Probabilities & Raw Logits (20 Canonical AAs)
33-Token ESM Vocabulary Breakdown
<cls> (0) and <eos> (2) frame
single-letter amino acids; <mask> is ID 32; out-of-vocab
symbols map to <unk> (3).
2. Why ESM-2 150M Matters & How It Runs
facebook/esm2_t30_150M_UR50D (MIT) is trained with masked language modeling across
evolutionarily diverse UniRef50/D protein sequences. At 30 layers and 640 hidden
width, it builds deep co-evolutionary representations that score variant pathogenicity zero-shot
without multiple sequence alignments.
import { AutoTokenizer, AutoModelForMaskedLM } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";
const tok = await AutoTokenizer.from_pretrained("Xenova/esm2_t30_150M_UR50D");
const model = await AutoModelForMaskedLM.from_pretrained("Xenova/esm2_t30_150M_UR50D", { device: "wasm", dtype: "q8" });
const enc = await tok("MQIFVKTLTGKTITLEVEPS<mask>TIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG");
const { logits } = await model(enc); // [1, seq_len, 33], <mask> id = 32
Show the code · worker.js — runMaskedForward() (151.64 MB q8 WASM worker)
Show the code · esm2-150m-core.mjs — computeDistributionMetrics() (33-vocab entropy & NaN check)
Use-case ladder
Basics · 20-AA Log-Odds, Active-Site Entropy & Capacity Scaling
Inspect all 20 canonical amino-acid log-odds grouped by biochemistry, contrast active-site vs flexible-loop entropy, and benchmark 8M vs 35M vs 150M capacity specs.
Practical · FASTA Deep Mutational Scanning & Variant Matrix
Upload FASTA, ragged CSV, or JSON protein sequences, scan an L × 20 variant-effect LLR heatmap off-main-thread with mid-scan Cancel, and export OWASP CSV/Markdown/JSON.
Wild · Disulfide Conservation, Gly/Pro Turns, <unk> & Truncation
Stress-test cysteine S-S bridges, tight Gly/Pro backbone turns, selenocysteine U / <unk> (ID 3) tokenization, and 1026-token truncation sensitivity.
Multi-model · 8M vs 150M Mutant Log-Odds & Calibration Comparator
Run Stage 1 ESM-2 8M (8.06 MB) and Stage 2 ESM-2 150M (151.64 MB) side-by-side on identical variant sites to measure LLR shifts, KL divergence, and Spearman correlation.
3. References & Model Provenance
- Upstream weights & model card: facebook/esm2_t30_150M_UR50D (MIT)
-
Browser ONNX export:
Xenova/esm2_t30_150M_UR50D (
onnx/model_quantized.onnx, 151,633,416 B q8 + 8,819 B tokenizer/config = 151.64 MB) - Paper: Lin et al. (2023), Evolutionary-scale prediction of atomic-level protein structure with a language model (Science)