nanogpt-lecture contains the code developed during the nanoGPT installment of Andrej Karpathy's Neural Networks: Zero to Hero lecture series. It is designed to accompany the video so students can inspect, modify, and rerun the implementation themselves. The repository begins with a simple character-level bigram language model and develops toward a GPT-style transformer. Its compact Python code exposes core ideas such as tokenization, embeddings, attention, transformer blocks, training, and text generation. The Git history mirrors much of the progression shown during the lecture. The implementation favors educational clarity over production optimization and includes known limitations in areas such as weight initialization. It therefore serves as a practical bridge between introductory language modeling and larger GPT implementations.
Features
- Character-level language modeling
- Bigram baseline implementation
- Self-attention and transformer layers
- GPT-style text generation
- Lecture-aligned Git history
- Compact educational Python code