Multi-model · mBERT Cased (182.5 MB q8 · Apache-2.0) → DistilBERT Cased Sentiment (135.95 MB q8 · Apache-2.0)

2-Stage Shared-Vocab Audit: Cloze Fill × Top-K Sentiment Shift

Chain two models that share the exact same 119,547 cased WordPiece vocabulary offline (318.45 MB combined WASM q8): Stage 1 (google-bert/bert-base-multilingual-cased via Xenova/bert-base-multilingual-cased, 182.5 MB, Apache-2.0) generates top-K [MASK] completions, then Stage 2 (Xenova/distilbert-base-multilingual-cased-sentiments-student, 135.95 MB, Apache-2.0, reusing ../distilbert-base-multilingual-cased-sentiments-student/worker.js) audits how each candidate fill shifts 3-class sentiment polarity (positive / neutral / negative).

Same 119,547 Cased WordPiece Vocabulary Across Both Stages: Stage 2 (distilbert-base-multilingual-cased-sentiments-student) was distilled directly from distilbert-base-multilingual-cased, inheriting mBERT's exact 119,547-piece cased WordPiece tokenizer so every Stage 1 cloze replacement tokenizes cleanly without vocabulary mismatch.

1. Two Independent On-Device Models (318.45 MB Combined)

Stage 1 · mBERT Cased Fill-Mask (182.5 MB WASM q8)

Xenova/bert-base-multilingual-cased · fill-mask · Apache-2.0

Stage 2 · DistilBERT Cased Sentiment (135.95 MB WASM q8)

Xenova/distilbert-base-multilingual-cased-sentiments-student · text-classification · Apache-2.0

2. Top-K Candidate Sentiment Shift Audit Workbench

Stage 1 proposes top-K cased WordPiece candidates; Stage 2 measures how each fill flips net sentiment polarity.

Initialize both stages above to run the 318.45 MB Cloze × Sentiment Shift Audit.

Stage 1 MLM #1–
Most Positive Cand–
Most Negative Cand–
Polarity Spread–
Stage 1 / Stage 2 ms–
Combined NaN check–
Stage 1 mBERT cloze candidates audited by Stage 2 DistilBERT Multilingual Cased Sentiment
S1 Rank Candidate S1 MLM Prob Stage 2 Sentiment Net Polarity Shift vs #1 Completed Sentence
Run Stage 1 → Stage 2 above to audit candidate sentiment shifts.

3. Inspect Reused Stage 2 Client & Sentiment Shift Logic

Show the code · mbert-client.js — DistilBertSentimentClient (reusing ../distilbert-base-multilingual-cased-sentiments-student/worker.js)
Show the code · mbert-core.mjs — analyzeSentimentShiftAudit()