An Android keyboard that fixes typos with a language model running on the phone. Nothing you type leaves the device.
On-device
The model runs inside the keyboard process through llama.cpp. The only network use is down the model file you choose.
Corrections you can trust
Model output is checked against edit distance and a 56k-word dictionary before it may touch your text, and every change comes with an undo chip.
Adaptive keys
Letters that cannot continue a word shrink and fade. Hit areas never change, so names and slang stay typable.
Words as keys
When only a couple of words can finish what you typed, the keyboard offers them whole; an abc key brings the letters back.
Learns you, on your terms
With learning on, your own phrasing trains a small personal layer that never leaves the phone. Only word ids are stored; a toggle controls it and a forget button erases it.
Knows what comes next
A 7 MB neural network trained on 50 million words of text runs on the phone. It suggests the next word after each space and ranks completions by the four words before them.
What it does #
Type is a normal QWERTY keyboard with one difference: when you finish a word that isn't in the dictionary, a small language model looks at the last few words and decides what you meant. If it is confident, the word is replaced and an undo chip appears in the bar. Backspace right after a correction also puts the original back. Bare contractions get their apostrophes on the spot ("dont" becomes "don't", "im" becomes "I'm"), and everything that ranks candidates knows the key layout, so a slip onto a neighbouring key is treated as the likely explanation.
Typing is also captured by nothing else: the keyboard drops out of screenshots and recordings while a password field is focused, ignores touches that arrive through overlays, and skips learning in sensitive fields. While a word is still being typed, the dictionary and a sequence model do the work instead: the bar offers the most likely next word right after a space, completions are ranked by the words before them ("should ha" puts have up front), letters that can't continue any word fade away, and when only a few words remain possible they take over the keyboard as buttons. The correction model is only consulted mid-word once what you've typed can no longer start any dictionary word. The ✨ button runs a whole-sentence pass.
Which model #
Chosen by replaying 45 typo-and-context cases and 8 sentences through each candidate with the exact prompts the keyboard uses (the harness is tools/eval.py
). Typos fixed / correct-and-unusual words left alone / sentences fixed, with per-word latency on an M4; on a Pixel 9 the recommended model corrects a word in about a third of a second:
| Model | Fixed | Kept | Sentences | ms/word |
|---|---|---|---|---|
| Qwen2.5 1.5B Q8 | 35/35 | 9/10 | 8/8 | 83 |
| Llama 3.2 1B Q4 | 30/35 | 9/10 | 6/8 | 55 |
| SmolLM2 360M Q8 | 31/35 | 8/10 | 5/8 | 36 |
| Qwen3 1.7B Q8 | 32/35 | 9/10 | 5/8 | 95 |
| Gemma 3 1B Q8 | 32/35 | 6/10 | 1/8 | 84 |
| Qwen3 0.6B Q8 | 25/35 | 9/10 | 1/8 | 50 |
| Qwen2.5 0.5B Q8 | 24/35 | 9/10 | 1/8 | 40 |
The app offers SmolLM2 360M when you want the download small, Llama 3.2 1B as a middle ground, and Qwen2.5 1.5B as the recommended pick. "Kept" misses are mostly harmless: the keyboard rejects any model output that is far from what you typed, so a bad guess usually means no correction rather than a wrong one.
Prediction #
Suggestions while you type come from a separate, much smaller network: a 7 MB feed-forward model (four-word window, tied 128-d embeddings, int8) trained on 50 million words of conversational and encyclopedic text, built and evaluated by tools/nn/
. On 20,000 held-out cases it beats the word-pair table it replaced, and the pair table remains as an instant fallback:
| word pairs | network | |
|---|---|---|
| next word, top-1 | 11.4% | 18.9% |
| next word, top-3 | 19.9% | 31.6% |
| completion after 2 letters, top-1 | 56.6% | 76.4% |
Install #
- Download the APK and open it on the phone. Android will ask you to allow installs from this source.
- Open Type. Step 1 turns the keyboard on in the system settings; step 2 switches to it.
- Pick a model. SmolLM2 360M is quick on anything; Qwen2.5 1.5B is the accurate one and worth it on a recent phone. Models live in the app's private storage.
Without a model the keyboard still works and falls back to dictionary suggestions.
How the correction works #
The prompt has a fixed part (instructions and a handful of examples) and a short per-request part. The fixed part is decoded once and kept in the model's cache, so each correction only pays for a couple of dozen tokens plus the few it generates. Output is constrained with a grammar to a single word, then checked against edit distance and the dictionary before it is allowed to replace what you typed.
Build it yourself #
git clone --recursive git@github.com:thingg-co/type.git
cd type
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk
Needs Android Studio's SDK with NDK 28 and CMake 3.31. English only for now; the layout and dictionary are data files, so other languages can be added without touching the input logic. ./gradlew test
runs the unit suites; tools/eval.py
replays the model prompts.