“Neural Networks: Zero to Hero” is Andrej Karpathy’s free coding course on YouTube, going from handwritten backpropagation through to GPT and tokenizers. As of 21 October 2026, the official course page lists 8 lectures totaling about 14.5 hours of video; companion code is MIT-licensed on GitHub. The course issues no certificate. It fits learners with solid Python who want to implement language models themselves.

Illustration of an artificial neural network on a dark background, with dense links connecting layered circular nodes

Artificial neural network illustration. Author: DancingPhilosopher; source: Wikimedia Commons (uploaded 5 August 2023); license: CC BY-SA 4.0.

Eight lectures and companion repos

The course page frames the whole series as “building neural networks from scratch in code”: start with the foundations of backpropagation, then work up to modern deep networks such as GPT. Karpathy centers language models because most of what you learn there transfers directly to computer vision and other areas. Videos are on YouTube; Jupyter notebooks written in each lecture live under lectures/ in the nn-zero-to-hero repo; exercises are in each video’s description. The table below follows the course-page order for content, length, and companion code.

Lecture Main content Length Companion code
1 micrograd: scalar autodiff that makes backpropagation and neural-net training clear 2h25m micrograd repo, lectures/micrograd
2 makemore part 1: character-level bigram language model; introduces torch.Tensor, sampling, and negative log-likelihood loss 1h57m makemore repo, notebook
3 makemore part 2: multilayer perceptron (MLP); learning-rate tuning, hyperparameters, train/val/test splits, under- and overfitting 1h15m makemore repo, notebook
4 makemore part 3: statistical diagnostics of activations and gradients; BatchNorm 1h55m makemore repo, notebook
5 makemore part 4: without calling loss.backward(), manually backpropagate through a full two-layer MLP 1h55m notebook, Google Colab exercise
6 makemore part 5: deepen the MLP into a WaveNet-like tree; understand torch.nn 56m notebook
7 Build GPT from scratch: implement a Transformer following Attention is All You Need and GPT-2/GPT-3 1h56m ng-video-lecture repo
8 Build a GPT tokenizer: train, encode, and decode byte-level BPE 2h13m minbpe repo, Google Colab

The companion repos are small and suited to line-by-line reading with the videos. micrograd’s autodiff engine is about 100 lines and its neural-net library about 50, scalars only; makemore is a single editable script with a names.txt dataset of about 32,000 English names and PyTorch as its only dependency. Lecture 7’s code is in ng-video-lecture; the README notes that the video under-covers weight initialization, so convergence is slow—compare nanoGPT’s model.py. Lecture 8’s minbpe repo adds exercise.md step-by-step exercises and lecture.md as a text lecture. For lecture 5 the author explicitly recommends doing exercises while watching and only checking answers when stuck—not only watching.

Single-hidden-layer neural-network diagram: three columns of colored circular nodes (input, hidden, output) fully connected by arrows

Fully connected neural network with one hidden layer—the same family as the multilayer perceptron (MLP) implemented in lecture 3. Author: Cburnett; source: Wikimedia Commons; license: CC BY-SA 3.0.

On update status, the course page has no dated stamp; the syllabus ends with “ongoing.” The nn-zero-to-hero repo was created on 8 September 2022; the latest main-branch commit is 20 February 2024 adding the lecture 8 tokenizer, with no new lectures since. Among sub-repos, micrograd’s README was updated on 3 August 2026 with a link to the single-file pure-Python GPT example microgpt; makemore’s latest commit stops at 20 November 2022, minbpe at 22 April 2024. There is also a build-nanogpt repo and companion video Let’s reproduce GPT-2 (124M), reproducing GPT-2 (124M) from an empty file, but it is not on the course page or nn-zero-to-hero lecture list—this article treats it as extension material.

Prerequisites, runtime, and cost

The course page’s stated prerequisites are solid Python and introductory math such as derivatives and Gaussian distributions. Lecture 1’s bar is lower: basic Python and a fuzzy memory of high-school calculus. From lecture 2 onward PyTorch tensors are used heavily; lecture 7 assumes the autoregressive language-modeling frame, tensors, and basics of PyTorch nn, and recommends finishing the earlier makemore series first. In short, math only needs differentiation, the chain rule, and basic probability, but Python must support reading and writing a few hundred lines independently.

Runtime is mainly Jupyter notebooks plus PyTorch; the first eight lectures do not need a dedicated GPU. makemore’s README says training needs no special hardware—the author runs it on a MacBook Air, and a GPU is faster; minbpe’s training script finishes in about 25 seconds on the author’s M1 MacBook. micrograd can be installed with pip install micrograd, but its unit tests need PyTorch separately. Lectures 5 and 8 provide Google Colab links for in-browser runs; Colab free quota and GPU availability follow Google’s pages at the time (pending verification). Only the extension material build-nanogpt needs a cloud GPU; the author estimates reproducing GPT-2 (124M) at about 1 hour and about USD 10 in the README—that is the author’s own estimate.

Cost and certificates: as of 21 October 2026, videos are free on YouTube, code repos use the MIT license, and neither the course page nor the repos mention enrollment, payment, deadlines, or certificates—so the course offers no completion certificate or credit. There is no stated regional restriction, but learning depends on YouTube, GitHub, and Colab, so smooth access depends on local network conditions. The course page also links a Discord community for exercise questions.

Learning order and pacing

Follow the course-page order strictly: later lectures build directly on earlier code. The makemore series starts from a bigram model, then adds MLP, BatchNorm, manual backpropagation, and a deeper WaveNet-style structure; lecture 7 combines those foundations into a Transformer. Split the eight lectures into three stages: stage one is lecture 1—be able to write micrograd without the video and train a small net with it; stage two is lectures 2–6—get comfortable with tensor shapes and training diagnostics, finish each video’s description exercises, and really derive lecture 5 by hand; stage three is lectures 7 and 8—Transformer structure and how a tokenizer turns text into tokens.

The videos themselves are about 14.5 hours, but coding along and doing exercises usually takes several times that; plan roughly one lecture per week. Authors of ng-video-lecture and build-nanogpt note that commit history keeps each build step, so git log is a better way to replay construction than scrubbing the video. After the eight lectures, optional next steps are the build-nanogpt GPT-2 reproduction video, or microgpt linked from the micrograd README, putting autodiff and a Transformer in one file for another pass.

References

  1. Andrej Karpathy. Neural Networks: Zero to Hero course page. Page undated; retrieved 2026-10-21.

  2. Andrej Karpathy. karpathy/nn-zero-to-hero. GitHub, MIT license, latest main commit 2024-02-20, retrieved 2026-10-21.

  3. Andrej Karpathy. karpathy/micrograd. GitHub, MIT license, latest commit 2026-08-03, retrieved 2026-10-21.

  4. Andrej Karpathy. karpathy/makemore. GitHub, MIT license, latest commit 2022-11-20, retrieved 2026-10-21.

  5. Andrej Karpathy. karpathy/ng-video-lecture. GitHub, MIT license, retrieved 2026-10-21.

  6. Andrej Karpathy. karpathy/minbpe. GitHub, MIT license, latest commit 2024-04-22, retrieved 2026-10-21.

  7. Andrej Karpathy. karpathy/build-nanogpt. GitHub, MIT license, retrieved 2026-10-21.

  8. Smart Academy

  9. Information compiled and published by the Scholay academic one-stop platform; report infringement for takedown.

  10. Also published on Enter Scholar, a scholars’ community for the intelligent age