Pretraining (Next-Token Prediction)
In One Sentence
Self-supervised training on massive text and code corpora where the model learns world knowledge and syntax by predicting the next token.
ELI5 (Intuition)
Giant flashcards: cover up the last word of billions of sentences from books, websites, and code, guess the missing word, check the real answer, and adjust.
ELI18 (Technical)
Minimizes causal language modeling cross-entropy loss \[\mathcal{L}_{\text{PT}} = -\sum_{t=1}^T \log P_\theta(x_t \mid x_{<t})\] over trillions of tokens. Crucially, pretraining is not RL—the ground-truth next token is known at every step.
In Practice
Pretraining accounts for >90% of a base model's compute budget and gives it raw world knowledge, coding fluency, and pattern recognition—before SFT and RL turn it into a helpful assistant.