Basics · Inside 250K-Vocab Cross-Lingual Representation (297.4 MB WASM q8 · MIT)

Inside 250K Cross-Lingual Cloze: 6 Scripts & Subword Boundary Sensitivity

Run the same cloze concept across 6 scripts (EN / FR / DE / ES / JA / AR) through FacebookAI/xlm-roberta-base (Xenova/xlm-roberta-base, 297.4 MB WASM q8, MIT), then contrast Whole-Word vs Subword-Split cloze prompts to see how SentencePiece ▁ boundaries reshape the 250,002-vocab distribution.

Shared 250K Vocab Dynamics: Because one softmax head serves 100 languages at once, even a Japanese or Arabic prompt can assign non-trivial mass to Latin tokens (e.g. Tokyo / Paris) when high-frequency global entities appear in the 2.5 TB CC-100 corpus.

1. Same Cloze Prompt Across 6 Scripts (EN / FR / DE / ES / JA / AR)

Scripts completed–
Mean top-1 mass–
Mean vocab entropy–
Modal top-1 token–
NaN score check–
6-script latency–
Top-K predictions, top-1 probability mass, entropy, and latency across 6 parallel scripts
Lang / Script Prompt (<mask>) Top-1 Fill & Prob Top-3 Candidates Entropy / Toks Latency
Initialize the model above to probe 6 scripts live.

2. Subword Split vs Whole-Word Cloze Sensitivity

Compare a space-separated whole-word <mask> against a mid-word continuation prefix<mask> slot to watch SentencePiece ▁ vs continuation subwords shift.

Whole-word #1–
Subword-split #1–
Top-1 prob shift–
Entropy delta–
Pair NaN check–

Whole-Word Cloze Top-5 & Pieces

Run comparison above to inspect whole-word predictions.

Subword-Split Cloze Top-5 & Pieces

Run comparison above to inspect subword-split predictions.

3. Inspect 6-Script & Subword Analysis Helpers

Show the code · xlmr-core.mjs — analyzeCrossScriptAgreement()
Show the code · xlmr-core.mjs — analyzeSubwordSensitivity()