Skip to content

AI Glossary · Concepts

What is Next-Token Prediction?

Next-Token Prediction

Next-token prediction is the task an autoregressive language model is trained on and performs when it writes: given the text so far, it estimates which token is likely to come next, picks one, adds it to the text and repeats. This is how many familiar chat models generate text, though other approaches exist.

Also known as: next token prediction

· Chain of Thought

Model ArchitectureModel Training

  • 2 explainers
  • 4 episodes
  • 2 guest clips
  • 3 sources

Start with a phone keyboard that suggests the next word. An autoregressive language model does a far more capable version of the same job. It reads the text so far, scores every token in its vocabulary by how likely it is to come next, picks one, appends it and runs again. A three-paragraph answer is hundreds of those small steps in a row. Settings such as temperature control how adventurous each pick is.

Training teaches the scoring. During pre-training, the model sees huge amounts of text with the next token hidden, guesses it, and is corrected each time it is wrong. Later steps such as RLHF tune which continuations it prefers, so it answers questions and follows instructions instead of just continuing a web page. The InstructGPT paper makes that point directly: predicting the next token of internet text is not the same goal as following a user’s instructions.

Why it matters: the model is optimized to produce a likely continuation, not to check facts. That is one reason a fluent answer can still be wrong (see AI hallucination). It also explains why the wording and context you give a model change its answer so much.

On the show, guests use the idea to explain both limits and strategy. In episode 54 at 24:24, Dan Klein argues that systems in “a next token prediction mode” lack a sense of what they do and don’t know; they emit tokens based on “contextual plausibility.” In episode 55 at 2:03, Neo4j’s Sudhir Hasbe says generative technology “was about how do you predict the next word,” and argues enterprises need their own knowledge alongside the model. Galileo, then the show’s presenting sponsor, is thanked in the episode 54 opening and the episode 55 opening.

In episode 23 at 3:29, Poolside’s Eiso Kant describes the view that you could “just scale up next token prediction” to reach AGI, and says Poolside bet instead on scaling reinforcement learning. That is his company’s strategy, not a settled result. Episode 23 aired in season two, which Galileo sponsored while Conor worked there (Conor mentions Galileo at 19:01).

Hear it from the guest

“Systems don't really, do this when they're in like a next token prediction mode.”
Watch on YouTube
“All we have to do is just scale up next token prediction, scale up model size, provide more data”

Quotes lightly edited to remove filler words.

Sources

Go deeper

From the conversation