The One Objective That Rules Them All
Every major language model β GPT, Llama, Mistral, Gemini β is pretrained on a single objective: predict the next token. That's it. Given a sequence of tokens , the model outputs a probability distribution over the vocabulary for . Training minimizes how wrong those predictions are across billions of such positions.
This deceptively simple objective forces the model to internalize grammar, facts, reasoning patterns, and world knowledge β because all of that information is latent in which token comes next. You cannot predict "The capital of France is ___" without knowing geography. You cannot predict the closing brace of a function without understanding syntax. The objective is humble; its consequences are not.
Formally, given a corpus of tokens, the training loss is: This is the average negative log-likelihood over all token positions β also called cross-entropy loss.
