google-bert/bert-base-cased
Xenova/bert-base-cased
fill-mask (BertForMaskedLM)
## 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:
.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).
[MASK] locally.
Top-K Candidates & Raw Logits (Click to Preview)
Cased WordPiece ## Subword Chip Breakdown
Solid border = word-initial token; dashed = ## continuation subword; highlighted =
[MASK] (103); red = [UNK] (100).
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
- Upstream weights & model card: google-bert/bert-base-cased (Apache-2.0)
-
Browser ONNX export:
Xenova/bert-base-cased (
onnx/model_quantized.onnx, 109.67 MB q8) - Paper: Devlin et al. (2018), BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding