mindtype-tagger-v1.5
MindType's own grammar and spelling correction model, trained from scratch by Mindscend for an on-device keyboard (iOS and Android). Text never leaves the phone.
- 26.2M parameters, encoder-only transformer (8 layers, d=384), own 16k byte-level BPE tokenizer.
- Predicts one edit label per word (KEEP / DELETE / REPLACE_x / APPEND_x / case) in a single pass, so it is fast, tiny, and cannot invent words or rewrite correct text.
- Core ML package (8-bit weights) for iOS 18+, and ONNX (int8) for Android and servers.
What changed since v1.2: training pairs now include real misspellings, dropped words and tense errors (12M pairs), trained for a fixed 30,000 steps (longer training made earlier versions over-eager). Compared with v1.2: about a third fewer changes to correct real-world messages (1.9% vs 2.8%), far better at dropped words (F0.5 0.70 vs 0.08) and misspellings (0.96 vs 0.88), at the same overall F0.5.
Results (MindType evaluation suite, 4,356 held-out cases)
Settings: KEEP bias 2.0 and the plausibility guard used in the MindType apps.
| Set | n | F0.5 | Exact | False-positive rate | Lost protected spans |
|---|---|---|---|---|---|
| casual_clean | 118 | β | 0.966 | 0.034 | 0.000 |
| casual_noisy | 109 | 0.933 | 0.798 | 0.000 | 0.000 |
| coedit | 579 | 0.464 | 0.109 | 0.000 | 0.000 |
| formal_clean | 1000 | β | 0.966 | 0.034 | 0.000 |
| formal_noisy | 1000 | 0.874 | 0.666 | 0.000 | 0.000 |
| golden | 50 | 0.920 | 0.840 | 0.077 | 0.000 |
| preserve | 1000 | 0.839 | 0.662 | 0.000 | 0.000 |
| preserve_clean | 500 | β | 1.000 | 0.000 | 0.000 |
| overall | 4356 | 0.799 | 0.712 | 0.024 | 0.000 |
False-positive rate on 2,000 held-out casual messages (never used for training; used only to choose between two training seeds): 1.9% (v1.2: 2.8%).
On the *_clean sets there is nothing to fix; the false-positive rate is what counts there.
Compared with fine-tuned small LLMs and earlier versions (same suite)
| Model | Size | F0.5 β | Exact β | False positives β | Lost names/numbers β |
|---|---|---|---|---|---|
| Gemma 3 270M instruct, zero-shot | 270M | 0.122 | 0.2% | 99.6% | 3.9% |
| Gemma 3 270M + LoRA r32 | 270M | 0.571 | 57.4% | 23.1% | 2.9% |
| SmolLM2 360M + LoRA r32 | 360M | 0.663 | 63.1% | 20.1% | 0.3% |
| mindtype-tagger-v1.1 (keep bias 2, guard) | 26M | 0.748 | 68.3% | 8.65% | 0.0% |
| mindtype-tagger-v1.2 (keep bias 2, guard) | 26M | 0.800 | 72.4% | 3.1% | 0.0% |
| mindtype-tagger-v1.5 (keep bias 2, guard) | 26M | 0.799 | 71.2% | 2.4% | 0.0% |
Error types added in v1.5 (separate test sets, not used for training)
| Error type | n | v1.2 F0.5 | v1.5 F0.5 | v1.5 exact |
|---|---|---|---|---|
| Real misspellings ("recieve") | 500 | 0.882 | 0.963 | 93.4% |
| Dropped words ("I going home") | 500 | 0.078 | 0.698 | 39.2% |
| Present tense about the past ("Yesterday I go") | 248 | 0.049 | 0.119 | 2.4% |
Tense is still the weakest; it's next.
Files
| File | What it is |
|---|---|
model.safetensors |
PyTorch weights (fp32): encoder + per-token classification head |
config.json |
architecture (layers, width, heads, vocabulary and label counts) |
tokenizer.json |
16k byte-level BPE tokenizer (Hugging Face tokenizers format) |
labels.json |
the 15,000 edit labels, index β label |
plausible_pairs.json |
the word pairs the plausibility guard accepts |
coreml/MindTypeTagger.mlpackage |
Core ML model (8-bit weights, 26 MB), inputs padded to 16/32/64/96/160 tokens; 99.96% label agreement with fp32 |
onnx/mindtype_tagger.onnx |
ONNX model (opset 17, int8 dynamic quantization, 27 MB), inputs ids, mask (int64, [1, T]), output logits; 99.1% label agreement with fp32 |
metrics.json, log.jsonl, pretrain-log.jsonl, run.json |
evaluation results and training logs |
Training
- Pretraining: masked language modeling on FineWeb-Edu (ODC-BY): 1 hour on ~20M sentences, then 6.8 hours on 61.7M sentences.
- Correction: 12.02M (noisy, clean) pairs (30,000 steps at batch 256): synthetic phone-typing errors, CoEdIT GEC (Apache-2.0), and casual messages written by a local open-weight model (Qwen2.5-14B-Instruct) and filtered for correctness, plus real misspellings, dropped words and tense errors. 30% are already-correct text, so the model learns to leave good text alone.
Hardware: one RTX 3080 Ti laptop GPU, about 9 hours in total.
How it works
Text is split into words and punctuation; each word gets a label from labels.json: $KEEP, $DELETE,
$REPLACE_<word>, $APPEND_<word> (insert after), or a case change. The corrected sentence is the labels applied
to the words, and the model is run again (up to 3 passes) on its own output. One sentence takes about 4 ms on a
phone CPU (Core ML) and on a laptop CPU (ONNX Runtime).
Inference settings used for the results: KEEP bias 2.0 (added to the $KEEP logit; higher = fewer, surer fixes).
Names, numbers, emails and URLs are never changed.
Limitations
English only, sentence-level, experimental. Fixes what's there; it doesn't reword or change tone. It still rarely fixes tense. It can still change correct text (2.4% of correct sentences in our suite, 1.9% of real casual messages).
License
Apache-2.0 (weights, tokenizer, Core ML and ONNX models). Training data: FineWeb-Edu (ODC-BY), CoEdIT (Apache-2.0).
- Downloads last month
- 16