Neural Networks: Zero to Hero is a free course by Andrej Karpathy, a founding member of OpenAI and former director of AI at Tesla, that teaches neural networks by writing them from scratch in code. The official page describes it as starting with the basics of backpropagation and building up to modern deep neural networks such as GPT. Karpathy focuses on language models because, in his words, most of what you learn there transfers directly to other areas such as computer vision.

What the course covers

The syllabus on the official page lists eight YouTube lectures, each between 56 minutes and 2 hours 25 minutes long, adding up to roughly 14.5 hours:

  1. Building micrograd (2h25m): a step-by-step explanation of backpropagation and neural network training, built as a tiny autograd engine.
  2. Building makemore (1h57m): a bigram character-level language model, introducing torch.Tensor and the basics of training, sampling and loss.
  3. makemore Part 2: MLP (1h15m): a multilayer perceptron language model, plus learning rates, hyperparameters, data splits and overfitting.
  4. makemore Part 3: Activations and Gradients, BatchNorm (1h55m): diagnosing activations and gradients in deeper networks, and why Batch Normalization helps.
  5. makemore Part 4: Becoming a Backprop Ninja (1h55m): backpropagating by hand through a full network without PyTorch autograd.
  6. makemore Part 5: Building a WaveNet (56m): a deeper, tree-structured network similar to DeepMind’s WaveNet, and how torch.nn works.
  7. Let’s build GPT (1h56m): a transformer language model following “Attention Is All You Need” and GPT-2/GPT-3.
  8. Let’s build the GPT Tokenizer (2h13m): the byte-pair encoding tokenizer used in OpenAI’s GPT series, and the LLM quirks that trace back to tokenization.

The page marks the series as “ongoing”.

Format and materials

Everything is free. The lectures are on YouTube, and the companion GitHub repository (MIT licence) holds the Jupyter notebooks built in each video; exercises are listed in the video descriptions. Supporting code lives in Karpathy’s micrograd, makemore and minbpe repositories, and some lectures link Google Colab notebooks. A Discord server is offered for learners. There are no graded assignments, deadlines or certificate.

Prerequisites

The official page asks for solid Python programming and intro-level math, such as derivatives and the Gaussian distribution. Our video list on the math behind neural networks is a good refresher first.

Who it suits

Programmers who want to understand what happens inside a model rather than only call a library. It pairs well with a broader course such as Practical Deep Learning for Coders or the Hugging Face LLM Course. Our profile of Andrej Karpathy covers the instructor, and our roundup of the best AI courses to start learning puts it alongside other options.

Strengths and limits

Strengths are the from-scratch approach, the depth on backpropagation and language modelling, and zero cost. Limits are the lack of structure beyond the videos, no feedback on your work, and little coverage of topics such as fine-tuning, deployment or models outside language.