fill-mask · 151.64 MB WASM q8 · 30-Layer EsmForMaskedLM (150M) · UniRef50/D · MIT

ESM-2 150M — 30-Layer Protein Language Model

facebook/esm2_t30_150M_UR50D (served via Xenova/esm2_t30_150M_UR50D , MIT) scales ESM-2 up to 30 rotary transformer layers (20 heads, 640 hidden dim, 150M params — 18× the parameters of ESM-2 8M at 151.64 MB WASM q8) over the 33-token amino-acid vocabulary (<mask> ID 32, max_position_embeddings: 1026). Runs entirely on-device.

Upstream Model facebook/esm2_t30_150M_UR50D
ONNX Artifact Xenova/esm2_t30_150M_UR50D
Pipeline Task fill-mask (EsmForMaskedLM)
Size & Quant 151.64 MB · WASM q8 (151.63 MB ONNX + 8.8 KB tok)
Architecture 30 layers · 20 heads · 640 hidden · 2560 FFN
Vocab & Context 33 tokens · <mask> (32) · 1026 max pos · MIT
Why 30 Layers Matter for Proteins: While 6-layer ESM-2 8M learns local motifs, 30-layer 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>:

Drop a .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.
Inference latency–
Top-1 amino acid–
20-AA / 33-vocab H–
Conservation index–
Tokens / <unk>–
NaN logit check–
Backend / dtypeWASM · q8

Amino-Acid Probabilities & Raw Logits (20 Canonical AAs)

Awaiting live inference…

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).

Run inference to inspect ESM tokens.

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

3. References & Model Provenance