Skip to content
AgenticAIWiki
  1. Glossary
  2. Next-token prediction

Glossary term

Next-token prediction

The core task of a language model: given the tokens so far, estimate the probability of every possible next token.

Also called next token prediction.

Open lesson 2.1

From text to tokens · Chapter 2, and 1 more lesson below

In plain words

Generation repeats this step, appending one chosen token at a time. Sampling settings decide how the next token is picked from the probabilities.

Taught in

  1. 2.1From text to tokensChapter 2, What an LLM is · main lesson
  2. 5.1PretrainingChapter 5, How models are trained

Also in these lessons

AlignmentByte-pair encoding (BPE)Context windowInstruction tuningLarge language model (LLM)ParametersPretrainingReward modelRLHFTokenToken countingTokenizer