Next-Token Prediction

Text already contains examples of what follows what, giving us a training task without asking someone to label every sentence. A next-token model learns to predict each continuation using only the text available before it.

10 sections · 9 questions · 4 coding challenges

1 / 10

Could Predicting the Next Symbol Teach Us About Language?

BOTIE

After reading the beginning of a sentence, some continuations seem much more plausible than others. A model that predicts the next piece of text must learn something about spelling, recurring expressions, and longer relationships if it is to keep making useful predictions.

In his 1948 work on communication, Claude Shannon illustrated statistical approximations to English using progressively more structure in symbol and word sequences. This was not a modern language model, but it established a useful perspective: language can be studied through conditional probabilities and the uncertainty remaining about what comes next.

A next-token model turns that perspective into a training task. The earlier tokens are the input, and the following token supplies an observed target. Text therefore supplies many examples without someone labelling each sentence by hand. Predicting the target well requires useful regularities, but it does not by itself guarantee that a generated statement is true or that the model will follow an instruction.

Sources for this history