GitHub · nn-zero-to-hero: Neural Networks: Zero to Hero
Open the sourceThis README outlines Karpathy's course that teaches neural networks from the basics by coding and training them together, progressing from a scalar autograd engine (micrograd) through character-level language models (makemore) to building GPT and its tokenizer from scratch. He emphasizes hands-on implementation, understanding internals like gradients and activations, and building intuition that enables debugging and innovation.
- The course starts at the basics and assumes only Python and a vague recollection of high school calculus. - Language modeling is framed as model training, sampling, and evaluating a loss such as negative log likelihood. - He teaches scrutinizing forward-pass activation and backward-pass gradient statistics to diagnose the health of deep networks. - Manually backpropagating through a network builds intuition for how gradients flow and helps with debugging modern nets. - A typical deep learning workflow involves reading documentation, tracking tensor shapes, and moving between notebooks and repo code. - He argues many weird LLM behaviors trace back to tokenization, a separate pipeline stage that ideally would be removed.
Based on Andrej Karpathy's public content. Not affiliated with or endorsed by Andrej Karpathy.
Supports these rules
Quotes from this video
“In this lecture we build from scratch the Tokenizer used in the GPT series from OpenAI.”
“Let's build GPT: from scratch, in code, spelled out.**”
“I recommend you work through the exercise yourself but work with it in tandem and whenever you are stuck unpause the video and see me give away the answer.”
“This video is not super intended to be simply watched.”
“scrutinize the statistics of the forward pass activations, backward pass gradients, and some of the pitfalls when they are improperly scaled.”
“This helps build competence and intuition around how neural nets are optimized and sets you up to more confidently innovate on and debug modern neural networks.”
“a lot of weird behaviors and problems of LLMs actually trace back to tokenization.”