Supervised learning teaches a model from examples that pair an input with the desired output, or label. The model learns the task by seeing many such pairs, then aims to produce useful outputs for inputs it has not seen before. section 1.27
Predicting the next token
An LLM can train on pairs such as “Better safe than” → “sorry” and “The Eiffel” → “Tower.” Image categorization uses the same pattern: each sample image is paired with a category such as “strawberry,” “plane,” or “dog.” section 1.27
The basic pattern has a few practical consequences:
- Training data consists of input–label pairs that demonstrate the exact task the model should perform. section 1.27
- Labels may require people to classify tens of thousands of examples, making data preparation expensive and slow; some labels can instead be generated automatically. section 1.27
- Generalization means working well on new inputs, while overfitting means memorizing training examples and failing on unseen data. section 1.27
- Conditional diffusion models use supervision to learn image repair from corrupted images, captions, and their uncorrupted versions. section 1.32
Figure 1.10 Training examples are generated by subdividing existing sentences and turning the last token in each into the desired autocomplete label.
Shows how existing sentences can be subdivided into training examples by turning each final token into the desired autocomplete label. section 1.27
Supervision is not the only way to create training examples. Self-supervised learning generates examples automatically by scanning data; popular LLMs use that approach first and may later be refined with manually generated data. section 1.34


















