FacebookAI/xlm-roberta-base
Xenova/xlm-roberta-base
fill-mask
<mask> (token ID 250001) rather than BERT's [MASK].
SentencePiece prefixes word-initial tokens with ▁ (U+2581), so one 250K softmax
head ranks English, French, Spanish, German, Japanese, Chinese, Arabic, Hindi, and Russian together.
1. 100-Language <mask> Cloze Completion Workbench
Pick a language preset across 9 scripts, drag & drop or paste (Ctrl/Cmd+V) a sentence, or type your
own single-<mask> cloze prompt:
.txt, .md, .csv, or .json file here, or
press Ctrl/Cmd+V outside editable inputs. Use <mask> exactly once on this
workbench (see the Wild Lab tab above for multiple masks).
<mask> locally.
Top-K Candidates & Raw Logits (Click to Preview)
SentencePiece ▁ Subword Chip Breakdown
Solid border = ▁ word-initial token; dashed = continuation subword; highlighted =
<mask> (250001).
2. How XLM-RoBERTa Base Works in Browser
FacebookAI/xlm-roberta-base trains a 12-layer RoBERTa encoder on 2.5 TB of filtered CommonCrawl CC-100 across 100 languages with a shared 250,002-token SentencePiece Unigram model. Every language shares the same embedding matrix and MLM head, enabling cross-lingual cloze completion without language IDs.
import { pipeline } from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.7.5";
const unmask = await pipeline("fill-mask", "Xenova/xlm-roberta-base", {
device: "wasm",
dtype: "q8",
});
const out = await unmask("La capitale de la France est <mask>.", { top_k: 8 });