Predict what comes next, then do it again.
Text is split into tokens—often words, pieces of words, punctuation, or other symbols. Given a sequence of tokens, an autoregressive language model estimates which token is likely to come next. The system selects a token, adds it to the sequence, and runs the process again. For the details behind that split, read the guide to tokens and context windows ↗.
For a familiar sentence like “The city woke before…”, many continuations could fit. The model produces scores for possible next tokens based on its learned parameters and the context in front of it. The choice is repeated, so a small difference early in the sequence can lead to a different answer later.
Many widely used language models use Transformer architectures. The 2017 Transformer paper introduced an architecture built around attention mechanisms, which help the model relate different parts of a sequence. The word “Transformer” describes a family of architectures; products can use different training and serving setups. See how the architecture works ↗.
