fill-mask · 67.20 MB WASM q8 · 6-Layer DistilBertForMaskedLM (~65M) · English Cased · Apache-2.0

DistilBERT Base Cased — 6-Layer English Cased WordPiece Cloze

distilbert/distilbert-base-cased (served via Xenova/distilbert-base-cased , Apache-2.0) distills 12-layer cased BERT into a fast 6-layer encoder (~65M params, 66.53 MB q8 ONNX + 0.67 MB WordPiece tokenizer + configs = 67.20 MB WASM download) using a 28,996-token cased WordPiece vocabulary (do_lower_case: false, [MASK] ID 103) right inside your browser.

Upstream Model distilbert/distilbert-base-cased
ONNX Artifact Xenova/distilbert-base-cased
Pipeline Task fill-mask (DistilBertForMaskedLM)
Size & Quant 67.20 MB · WASM q8 (66.53 MB ONNX + 0.67 MB tok)
Vocab & Mask 28,996 Cased WordPiece · [MASK] (103)
License & Architecture Apache-2.0 · 6 layers · 12 heads · 768d · 512 tok
6-Layer Cased Distillation with ## Continuations: Unlike distilbert-base-uncased, this checkpoint sets do_lower_case: false and keeps capitalized proper nouns, calendar months, and acronyms distinct across all 28,996 entries, marking continuation subwords with ## and mapping unseen symbols to [UNK] (ID 100) — in 67.20 MB (39% smaller than 12-layer BERT Base Cased).

1. Cased English [MASK] Cloze Completion Workbench

Pick a preset, drag & drop or paste (Ctrl/Cmd+V) an English sentence, or write your own single-[MASK] prompt:

Drop a .txt, .md, .csv, or .json file here, or press Ctrl/Cmd+V outside editable inputs. Use [MASK] exactly once on this workbench (use the Wild Lab tab above for multi-mask sentences).
Initialize the model above to fill [MASK] locally.
Inference latency–
Top-1 prediction–
Full-vocab entropy–
Top-K mass / Share–
WordPiece / ## / UNK–
NaN score check–
Backend / dtypeWASM · q8

Top-K Candidates & Raw Logits (Click to Preview)

Awaiting live inference…

Cased WordPiece ## Subword Chip Breakdown

Solid border = word-initial token; dashed = ## continuation subword; highlighted = [MASK] (103); red = [UNK] (100).

Run inference to inspect cased WordPiece tokens.

2. Why DistilBERT Base Cased Matters & How It Runs

distilbert/distilbert-base-cased distills 12-layer BERT Base Cased into a compact 6-layer bidirectional Transformer on cased English BookCorpus and Wikipedia prose using the exact same 28,996-piece cased WordPiece vocabulary. Because case cues distinguish proper organizations, months, and people from lowercase common nouns (such as Apple vs apple, Amazon vs amazon, or March vs march), it powers fast in-browser copyediting, redacted-text completion, and cased entity pipelines at 67.20 MB.

import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";

const unmask = await pipeline("fill-mask", "Xenova/distilbert-base-cased", {
  device: "wasm",
  dtype: "q8",
});
const out = await unmask("Apple unveiled its newest [MASK] at the keynote in Cupertino.", { top_k: 8 });
Show the code · worker.js — runSingleFill() (67.20 MB q8 WASM worker)
Show the code · distilbert-cased-core.mjs — computeDistributionMetrics() (entropy & NaN check)

3. References & Model Provenance