Live Contextual Proofreader
Two-stage local correction: Misspellings (recieve → receive)
are searched in an 80,000-word flat Trie with QWERTY edit costs and re-ranked by the left GRU.
Real words in the wrong place (letter form the harbor → from) are scored
against up to 8 confusion & 1-edit neighbors using both left (16 words) and right (4 words) context —
while valid uses (fill out the form) stay quiet.
Ready to download or initialise paperweight/tinyfix (3.55 MB quint8 WASM).
Inline diff (<del> / <ins>)
Cleaned output
See inside — Top-k GRU lexicon candidates
Select any flagged edit below to inspect the exact candidate set scored by
wrong-word.onnx, its raw bidirectional GRU logits, margin over the typed word,
and QWERTY keyboard typo cost. Dragging the confidence slider above immediately updates which
edits apply without re-running inference.
Candidate probabilities & margins
Run Proof text to inspect top-k bidirectional GRU candidates.
Bidirectional GRU logit profile
Green = top-1 accepted replacement; amber = originally typed word (*); indigo = competing lexicon neighbors.
At a glance
| Model |
paperweight/tinyfix
(revision 5b1491e3e3a59ca75a51a952912ca1200b172d87, created for offlinepage.app)
|
|---|---|
| Task | text2text-generation — contextual real-word autocorrect & spelling correction |
| Architecture |
Two single-layer GRUs (left-to-right 16 words + right-to-left 4 words) joined and scored
against up to 9 candidate embeddings (1.9M params, 64-dim embeddings,
256 hidden size, plain matrix multiplies for 8-bit ONNX quantization)
|
| Vocabulary & lexicon |
20,000 lowercase GRU words + 5 special tokens
(<pad>=0, <unk>=1, <num>=2,
<start>=3, <name>=4),
~160 confusion groups (wrong-word-confusions.txt), and an
80,000-word frequency Trie (words.txt)
|
| Tensor I/O shape |
Inputs: left [B, 16], right [B, 4] (reversed),
candidates [B, 9] (int64) → Output: scores [B, 9] (float32 logits)
|
| Quantisation & download |
quint8 (8-bit quantized ONNX graph) · 3.55 MB decimal
(3,549,457 bytes · 3.39 MiB total: wrong-word.onnx 2.09 MB +
words.txt 1.28 MB + wrong-word-vocab.txt 0.17 MB +
wrong-word-confusions.txt 2.9 KB)
|
| Backend & runtime |
CPU WebAssembly (wasm) via onnxruntime-web 1.21.0 in a dedicated
module Web Worker — no WebGPU required (~3 ms per word check in Chrome)
|
| Training data | ~120M words of self-supervised English text (70M FineWeb-Edu + 50M SmolTalk + OpenAssistant), with 25% of examples centered on 160 human confusion groups (half unswapped to teach restraint) |
| License | MIT License (verified from paperweight/tinyfix LICENSE & model card) |
| Honest limitations | English-only. Model-card benchmarks report 69% fix rate (99% precision) on classic mix-ups, 29% on real-word finger slips, and 18% on GitHub commit typos (~1 wrong edit per 2,000 clean words in Careful mode). Stays quiet when both words fit context, cannot judge words outside its 20,000-word GRU vocabulary, and needs right-hand words before firing a real-word swap. |