Multi-model · DistilRoBERTa Base (85.08 MB q8 · Apache-2.0) → DistilBERT SST-2 English (68.29 MB q8 · Apache-2.0)

2-Stage English Audit: Cloze Fill × Top-K SST-2 Polarity Shift

Chain two lightweight Apache-2.0 distilled transformers offline (153.37 MB combined WASM q8): Stage 1 (distilbert/distilroberta-base via Xenova/distilroberta-base, 85.08 MB) proposes top-6 <mask> substitutions, then Stage 2 (Xenova/distilbert-base-uncased-finetuned-sst-2-english, 68.29 MB, reusing ../distilbert-base-uncased-finetuned-sst-2-english/worker.js) scores each completed sentence in a single batch to quantify downstream sentiment polarity shift.

Two Distilled Encoders, Zero Cloud Calls: Stage 1 swaps <mask> with top-6 byte-level BPE completions; Stage 2 dynamically reads id2label and batch scores from the sibling SST-2 worker to show how a single word choice swings binary sentiment.

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

Stage 1 · DistilRoBERTa Base Fill-Mask (85.08 MB WASM q8)

Xenova/distilroberta-base · fill-mask · Apache-2.0

Stage 2 · DistilBERT SST-2 English (68.29 MB WASM q8)

Xenova/distilbert-base-uncased-finetuned-sst-2-english · text-classification · Apache-2.0

2. Top-K Candidate SST-2 Polarity Shift Workbench

Stage 1 proposes top-6 byte-level BPE candidates; Stage 2 measures how each fill flips SST-2 polarity.

Initialize both stages above to run the 153.37 MB Cloze × SST-2 Polarity Shift Audit.

Stage 1 MLM #1–
Most Positive Cand–
Most Negative Cand–
Polarity Spread–
Stage 1 / Stage 2 ms–
Combined NaN check–
Stage 1 DistilRoBERTa cloze candidates audited by Stage 2 DistilBERT SST-2 English
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 polarity shifts.

3. Inspect Reused Stage 2 Client & Polarity Shift Logic

Show the code · distilroberta-client.js — DistilBertSst2Client (reusing ../distilbert-base-uncased-finetuned-sst-2-english/worker.js)
Show the code · distilroberta-core.mjs — analyzeSentimentShiftAudit()