Keyboard Autocomplete
The word suggestions above your phone keyboard: small on-device language models that predict your next word, in Gboard's case trained with federated learning so your typing stays on your phone.
Also next-word prediction · predictive text · Gboard · autocorrect · smart compose
Phone keyboards; Google's federated learning work on Gboard, 2017 to 2018
As you type 'see you', your phone guesses 'tomorrow' or 'soon' because it has learned how people usually finish that phrase, and it learned without reading your messages on a server.
Where it fits
+All relationships as a list
Is a kind of / part of
Siblings
- AI Agents and Tool Use
- BERT
- Direct Preference Optimization
- Embedding
- Fine-Tuning
- Google Translate
- GPT
- Hallucination
- In-Context Learning
- Large Language Model
- LLM Evaluation and Benchmarks
- Perplexity
- Pretraining
- Prompting
- Retrieval-Augmented Generation
- RLHF
- Sampling and Temperature
- Scaling Laws
- Tokenization
- Vector Database
- word2vec
How it works
The three suggested words above your phone keyboard are a small language model at work: given what you have typed so far, predict the most likely next word. It is the same task that LLMs are trained on, at a much smaller scale.
Phone keyboards have special constraints:
- Speed and battery: suggestions must appear instantly, so the model runs on the phone (edge AI). Older keyboards used simple n-gram counts; newer ones use small LSTMs or Transformers.
- Privacy: what you type is extremely personal.
Google tackled the privacy problem in its Gboard keyboard with federated learning: phones improve the model locally on their own typing and send only model updates, which are combined on a server. A 2018 paper reported that a next-word model trained this way beat one trained on server-side data. Later work added differential privacy guarantees to these models.
Autocorrect is a related problem: given a misspelled word and its context, which word did you most likely mean? That combines a language model with a model of typical typing errors on a small touchscreen.
Everyday use cases
- Case 01
How you've probably met it
Tapping the suggested word above your keyboard, or autocorrect fixing (or ruining) a word you typed.
Strengths, weaknesses and when to use it
Strengths
- Instant and private, since the model runs on the phone.
Weaknesses
- Small models make odd suggestions; autocorrect can be stubborn about names and slang.
When to use itAs the everyday example of language modeling, edge AI and federated learning.