Next Token Prediction
What is Next Token Prediction?
In one sentence: Next token prediction is the simple training game behind LLMs: look at some text and guess which token comes next.
The model sees "The capital of France is" and tries to guess "Paris." If it is wrong, it adjusts. By doing this trillions of times on all kinds of text, it picks up grammar, facts, reasoning patterns and writing styles, all from this one guessing game.
What does Next Token Prediction look like?
Your phone suggesting the next word while you text is a tiny version of next token prediction.
Why does Next Token Prediction matter?
This one idea is the foundation of how large language models learn and how they write.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/next-token-prediction/">Next Token Prediction, explained simply</a> (The AI Math Dictionary)