a free course · high-school math only
Start from zero.
Finish by writing a GPT.
Andrej Karpathy fit the complete algorithm behind ChatGPT into 200 lines of plain Python. This course takes you from your first line of code to writing every one of them yourself, and understanding why each one is there.
Every lesson, the same loop
Watch
A short film builds the intuition before any formula.
Explore
Drag, click, roll the dice: play with the idea live.
Build
Write the real code in your browser. Tests tell you when it’s right.
Check
Predict-then-answer questions that make it stick.
Stuck? A tutor that knows the lesson (and your code) gives hints, never answers. Each lesson then lights up the lines of microgpt you now own.
The road
12 modules, about 51 lessons of 20–30 minutes. Part A builds the thinking tools. Part B climbs Karpathy’s own ladder from a table of counts to a Transformer.
- M0The destination
- M1Computational thinking & Python
- M2Data structures
- M3Algorithms
- M4Math toolkit (visual first)
- M5Language as probabilitytrain0.py
- M6Learning = walking downhilltrain1.py
- M7Autograd = automatic chain ruletrain2.py
- M8Attentiontrain3.py
- M9The full Transformertrain4.py
- M10Training like a protrain5.py
- M11Capstone
Open now
Built on ideas from Andrej Karpathy (build it from scratch, spelled out) and Andrew Ng (intuition first, then practice). Not affiliated with either.