Wild · ALL-CAPS Shatter, [UNK] Gaps, Bias Log-Odds & Dual-[MASK] · 110.34 MB WASM q8 · Apache-2.0

WordPiece Stress Lab: Casing Shatter, Bias Log-Odds & Dual-[MASK]

Stress-test google-bert/bert-base-cased (Xenova/bert-base-cased, 110.34 MB WASM q8, Apache-2.0) across 9 empirical edge probes with mid-suite Cancel: proper-noun vs ALL-CAPS shatter, emoji [UNK] (ID 100) gaps, CamelCase identifier splits, homographs, dual-[MASK] ordering, and a gender/occupation log-odds bias comparator.

Empirical Cased WordPiece Boundaries: Without byte-level BPE fallback, BERT Base Cased's 28,996-piece vocabulary maps emojis to [UNK] (ID 100) and shatters ALL-CAPS or CamelCase words into short ## fragments.

1. Live 9-Case WordPiece Stress Suite (4 Edge Categories)

Probes completed–
Mean top-1 prob–
Mean vocab entropy–
Total [UNK] / Masks–
NaN score check–
Total latency–

2. Gender / Occupation Bias Log-Odds Comparator

Measure live log-odds skew log2((P(tok|A)+ε) / (P(tok|B)+ε)) across identical English frames (e.g., He vs She at the metropolitan hospital).

Frame A #1–
Frame B #1–
Max |log2-odds|–
Top skewed token–
Candidate probability comparison and log2-odds skew between Frame A and Frame B
Candidate P(tok | A) P(tok | B) log2-Odds (A / B) Frame Lean
Run the comparator above to inspect token log-odds skew.

3. Perturbation Sandbox (Lowercase, ALL-CAPS, Title Case & Emoji [UNK])

Baseline (–)

Run comparison above to inspect baseline predictions.

Perturbed (Δ –)

Run comparison above to inspect perturbed drift.

4. Inspect Bias Log-Odds & WordPiece Chip Builders

Show the code · bert-cased-core.mjs — computeBiasLogOdds()
Show the code · bert-cased-core.mjs — buildWordPieceChips()