nanoLLM is a set of experiments that makes language-model behavior concrete by comparing increasingly capable sequence models on the same task.
The project moves from simple recurrent models to Transformers, making it easier to see what changes when memory, context, and attention improve.
How do RNN, GRU, LSTM, and Transformer architectures compare when trained under a consistent experimental setup?
How do context length and the number of attention heads affect language-model performance?
On Tiny Shakespeare, the modern Transformer achieved the lowest validation bits per byte at 2.1052, compared with 2.4384 for the vanilla RNN. GRU and LSTM narrowed most of the gap, while the larger LSTM underperformed the smaller one despite using roughly four times as many parameters.
Tokenization, sequence modeling, recurrent networks, self-attention, Transformer architecture, validation metrics, experiment sweeps, and reproducible analysis.