Skip to TinyFix and DistilBERT SST-2 pipeline

Multi-model · 2 models · 2 Web Workers · 3.55 MB + 68.29 MB WASM · MIT + Apache-2.0

2-Stage Spelling Cleanup → Sentiment Stabilizer

Chains Stage 1: TinyFix (paperweight/tinyfix, 3.55 MB quint8 WASM) with Stage 2: DistilBERT SST-2 (reusing built ../../distilbert-base-uncased-finetuned-sst-2-english/worker.js, 68.29 MB q8 WASM), then compares sentiment polarity, raw logit margin, and WordPiece ## subword fragmentation Before vs After TinyFix cleanup.

1 · Workflow models (~71.8 MB total)

Stage 1 · TinyFix Autocorrect (3.55 MB)

Bidirectional GRU + 80k lexicon via ../worker.js (paperweight/tinyfix, quint8 WASM, MIT).

Stage 2 · DistilBERT SST-2 Sentiment (68.29 MB)

Binary sentiment + WordPiece inspector reusing ../../distilbert-base-uncased-finetuned-sst-2-english/worker.js (Xenova/distilbert-base-uncased-finetuned-sst-2-english, q8 WASM, Apache-2.0).

2 · Clean noisy copy → compare Before vs After sentiment

Download or initialise both models above, then click Run both stages.

Before TinyFix–
After TinyFix–
Δ P(POSITIVE)–
Δ Logit margin–
## Subwords saved–
Stage 1 / Stage 2–
NaN check–

Stage 1 · TinyFix inline diff (<del> / <ins>)

Run Stage 1 or both stages to see contextual corrections applied before sentiment classification.

Compares live DistilBERT SST-2 probabilities on the raw noisy string versus the TinyFix-cleaned string.

Before TinyFix (raw WordPiece tokens)

Awaiting Stage 2 DistilBERT SST-2 pass.

After TinyFix (cleaned WordPiece tokens)

Awaiting Stage 2 DistilBERT SST-2 pass.

See inside the code

Show the code — tinyfix.js: Sst2StageClient (reused built DistilBERT SST-2 worker)
Show the code — tinyfix-core.mjs: compareSentimentBeforeAfter() (probability, logit & subword delta)