Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Video · AI & Machine LearningFree

Neural Networks: Zero to Hero

A free video course by Andrej Karpathy that builds neural networks from scratch in Python, starting with backpropagation on single numbers and ending with a GPT-style transformer and its tokeniser. It is for programmers who want to understand what deep learning frameworks do underneath, so that training problems stop being a mystery. It needs solid Python and basic calculus.

Lectures

8

karpathy.ai · Sept 2026

Total video

About 15 hours

karpathy.ai · Sept 2026

GPT lecture views

7.9M

YouTube · Sept 2026

micrograd GitHub stars

17.6k

GitHub · Sept 2026

Price

Free

karpathy.ai · Sept 2026

Format

Video

Topic

AI & Machine Learning

Provider

Andrej Karpathy

Time needed

About 20 hours

Level

Intermediate

Access

Free

The lectures, in order

Each lecture builds on the last, and every piece is written live in code:

  1. Building micrograd (about 2.5 hours): a tiny automatic differentiation engine, which makes backpropagation concrete.
  2. Building makemore (about 2 hours): a character-level bigram language model, and an introduction to PyTorch tensors.
  3. Makemore part 2, MLP (about 1.25 hours): a multilayer perceptron language model.
  4. Makemore part 3, activations, gradients and BatchNorm (about 2 hours): how to diagnose a deep network that is not training well.
  5. Makemore part 4, becoming a backprop ninja (about 2 hours): backpropagating through the network by hand.
  6. Makemore part 5, building a WaveNet (about 1 hour): a deeper, convolution-style architecture.
  7. Let's build GPT (about 2 hours): a transformer following Attention Is All You Need.
  8. Let's build the GPT tokeniser (about 2 hours): byte pair encoding from scratch.

That is roughly 15 hours of video, adding up the lengths listed on the course page, but typing along and experimenting takes several times longer. Plan on a few weeks.

Before you start

The stated prerequisites are solid Python and introductory maths, such as what a derivative is and what a Gaussian distribution looks like. You do not need prior machine learning experience. If Python is shaky, fix that first, because the lectures move quickly through code.

Why building it by hand pays off

Frameworks hide exactly the parts you need to reason about when something goes wrong. After micrograd, a gradient is no longer an abstract idea but a number you have computed yourself. After the activations lecture, a loss curve that stalls or explodes becomes something you can diagnose rather than guess at. By the GPT lecture, attention is code you wrote, not a diagram.

How to get the most from it

  • Type the code yourself in a notebook. Watching without typing gives a false sense of understanding.
  • Pause before each new step and predict what comes next.
  • Do the exercises in the video descriptions, especially in the makemore lectures.
  • The micrograd, backprop ninja and GPT lectures are the most demanding and the most rewarding. Do not skip part 4 even though it is hard.
  • Use the course Discord if you get stuck.

Where it stops

It focuses on understanding, not on production machine learning. It does not cover deploying models, data pipelines, fine-tuning large pretrained models or classical machine learning. Pair it with a practical course such as Made With ML or the fast.ai course if your goal is shipping models.

How popular it is, and why

The Let's build GPT lecture alone had about 7.9 million YouTube views and the micrograd lecture about 4.1 million as of September 2026, and the micrograd repository had about 17,600 GitHub stars. Learners widely praise the step-by-step pace and the fact that nothing is hidden. The usual complaint is the difficulty jump in the later makemore lectures, which is exactly where the most learning happens.

Common questions

Can I skip straight to Let's build GPT? You can, but the earlier lectures establish the tensor and training-loop habits it relies on. At minimum, do micrograd and the first makemore lecture first.

Do I need a GPU? Not for most of it. The early lectures run fine on a laptop, and a free Colab notebook is enough for the GPT lecture at small scale.

Is it enough to get a machine learning job? On its own, no. It gives deep understanding; employers also expect data handling, evaluation and deployment skills.

Best for: programmers who want a real understanding of how neural networks and language models work, and anyone considering machine learning work seriously.

aimachine learningfree coursepython

Ready to start?

Opens on Andrej Karpathy in a new tab.

Open resource
Link broken or out of date?

Report a problem

With "Neural Networks: Zero to Hero". Only Tauseef reads this.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.