mindtype-tagger-v1.2
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.1: a longer-pretrained encoder (+6.8 h on 61.7M sentences) and 8M correction pairs with 16ร more casual messages (21k vs 1.3k). False positives went from 8.65% to 3.1%, and F0.5 from 0.748 to 0.800.
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.000 | 0.966 | 0.034 | 0.000 |
| casual_noisy | 109 | 0.932 | 0.817 | 0.000 | 0.000 |
| coedit | 579 | 0.449 | 0.104 | 0.000 | 0.000 |
| formal_clean | 1000 | 0.000 | 0.962 | 0.038 | 0.000 |
| formal_noisy | 1000 | 0.881 | 0.688 | 0.000 | 0.000 |
| golden | 50 | 0.909 | 0.860 | 0.077 | 0.000 |
| preserve | 1000 | 0.839 | 0.705 | 0.000 | 0.000 |
| preserve_clean | 500 | 0.000 | 0.984 | 0.016 | 0.000 |
| overall | 4356 | 0.800 | 0.724 | 0.031 | 0.000 |
F0.5 is 0.000 on the *_clean sets by definition (there is nothing to fix); the false-positive rate is what counts
there.
Compared with fine-tuned small LLMs and v1.1 (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% |
Known gaps (separate test sets, not used for training)
| Error type | n | F0.5 | Exact |
|---|---|---|---|
| Real misspellings ("recieve") | 500 | 0.882 | 71.0% |
| Dropped words ("I going home") | 500 | 0.078 | 2.0% |
| Present tense about the past ("Yesterday I go") | 248 | 0.049 | 1.2% |
Dropped words and tense are the next things we're working on.
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.98% 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.2% 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: 8.02M (noisy, clean) pairs: 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. 30% are already-correct text, so the model learns to leave good text alone.
Hardware: one RTX 3080 Ti laptop GPU, about 11 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 rarely adds missing words or fixes tense yet (see Known gaps). It can still change correct text (3.1% of correct sentences in our suite).
License
Apache-2.0 (weights, tokenizer, Core ML and ONNX models). Training data: FineWeb-Edu (ODC-BY), CoEdIT (Apache-2.0).
- Downloads last month
- 15