6 steps · 0 done
This is a large language model in miniature. Same objective (predict the next token), same loss (cross-entropy), same sampling (temperature), same evaluation (held-out perplexity), but the tokens are letters, the corpus is 778 first names, and the model fits on a screen.
The approach follows Andrej Karpathy's makemore lectures: start with counting, then show that a one-layer neural network trained by gradient descent learns the same thing, then add context.
The project uses everything in this module. Solve these first:
- 6.1 Theory test: Language models
- 6.1 Practical: BPE and temperature
- 6.2 Theory test: Large language models
- 6.2 Practical: Preferences and scaling
- 6.3 Theory test: Generating images
- 6.3 Practical: The maths of diffusion and VAEs
what you'll build
- Tokens and a held-out set
- Count the bigrams
- Probabilities and perplexity
- Sample new names
- The same model, as a neural network
- More context, chosen honestly