fill-mask · 110.34 MB WASM q8 · 12-Layer BertForMaskedLM (109M) · English Cased · Apache-2.0

BERT Base Cased — English Cased WordPiece Cloze

google-bert/bert-base-cased (served via Xenova/bert-base-cased , Apache-2.0) is the classic 12-layer cased English BERT encoder (109M params, 109.67 MB q8 ONNX + 0.67 MB WordPiece tokenizer = 110.34 MB WASM download) using a 28,996-token cased WordPiece vocabulary (do_lower_case: false, [MASK] ID 103) right inside your browser.

Upstream Model google-bert/bert-base-cased
ONNX Artifact Xenova/bert-base-cased
Pipeline Task fill-mask (BertForMaskedLM)
Size & Quant 110.34 MB · WASM q8 (109.67 MB ONNX + 0.67 MB tok)
Vocab & Mask 28,996 Cased WordPiece · [MASK] (103)
License & Architecture Apache-2.0 · 12 layers · 12 heads · 768d · 512 tok
Cased WordPiece with ## Continuations: Unlike bert-base-uncased, this checkpoint sets do_lower_case: false and keeps capitalized proper nouns, acronyms, and sentence-initial tokens distinct across all 28,996 entries, marking continuation subwords with ## and mapping unseen symbols to [UNK] (ID 100).

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 dual-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 BERT Base Cased Matters & How It Runs

google-bert/bert-base-cased pretrains a 12-layer bidirectional Transformer on cased English BookCorpus and Wikipedia prose with a 28,996-piece cased WordPiece vocabulary. Because case cues distinguish proper organizations, people, and locations from common words (such as Apple vs apple or Bank vs bank), it serves as the backbone for cased NER, copyediting, and cloze verification inside your browser.

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

const unmask = await pipeline("fill-mask", "Xenova/bert-base-cased", {
  device: "wasm",
  dtype: "q8",
});
const out = await unmask("Tim Cook serves as chief executive of [MASK] in Cupertino.", { top_k: 8 });
Show the code · worker.js — runSingleFill() (110.34 MB q8 WASM worker)
Show the code · bert-cased-core.mjs — computeDistributionMetrics() (entropy & NaN check)

3. References & Model Provenance