Self-supervised learning generates labeled examples automatically from existing data. It remains supervised learning because the model learns from input–target pairs; “self” means the targets come from the data rather than manual labeling. section 1.27
Guessing the missing token
Take “The Eiffel Tower is in Paris,” remove the final token, and train the model to predict “Paris.” Repeating this across huge text collections creates next-token training examples for a language model. section 1.27
The basic recipe is straightforward:
- Collect a large amount of existing data, such as internet text. section 1.27 section 1.28
- Corrupt or subdivide each input so part of the original data becomes the target. section 1.27
- Train the model to reconstruct the missing information, commonly by guessing the next token. section 1.27
- Treat scale as an advantage, but not a guarantee: self-supervised models can perform impressively while still making serious mistakes. section 1.28
The method works when the task can be framed as reconstructing corrupted input. Early large language models used this approach with public text, then received manually generated data to align their behavior with user objectives. section 1.27 section 1.34
Figure 1.10 Training examples are generated by subdividing existing sentences and turning the last token in each into the desired autocomplete label.
Visualizes how subdividing sentences turns the final token into an autocomplete label. section 1.27







