My personal journey through character-level language models, inspired by Andrej Karpathy
The project tracks my progression from simple models to more complex architectures across sequential Jupyter Notebooks:
| Module | Focus | Description |
|---|---|---|
Part 1 |
Bigram Models | Introduction to language models. Building the foundation using statistical counting and a simple neural network. |
Part 2 |
MLP | Implementing a Multi-Layer Perceptron following the Bengio et al. 2003 paper. |
Part 3 |
Internals | Deep dive into activations, gradients, initialization, and Batch Normalization. |
Part 4 |
Backprop Ninja | Advanced manual backpropagation and dealing with deeper network complexities. |
Final |
Full MLP Backprop | Completing the manual backpropagation journey with a full MLP implementation from scratch. |
Note: Models are trained on names.txt, a dataset of names used to generate new, unique character-level variations.
- Core: Python 3
- Deep Learning: PyTorch (Tensors, Autograd)
- Environment: Jupyter Notebooks
- Visualization: Matplotlib (Embeddings, activations, and loss curves)
- Build a solid, intuitive understanding of manual backpropagation without relying entirely on PyTorch's
autograd. - Master PyTorch tensor operations, broadcasting semantics, and memory management.
- Progress towards modern architectures like GRUs, LSTMs, and eventually Transformers.
"Throughout Heaven and Earth, I alone backpropagate manually" - Gojo Satoru (probably)