AI from zero to hero
A course you work through by building. Each week you implement one piece of machine learning from scratch in Python and NumPy, inside your copy of the course repository, until its tests pass. The pieces grow into a small library, mlkit, that later weeks reuse.
Each unit is written the same way as the Math course. It opens dense: the model card, the key result, the build. Full opens the derivations and the reasoning. Every model also gets its failure modes, where it sits in the family of models, who uses it and how it behaves in production.
The course teaches only the mathematics a build needs at that moment, then links to the Math unit that covers it in full.
How a week works
Section titled “How a week works”- Read the unit in Dense mode. Open the Full blocks for anything that is not obvious.
- Answer the checks before revealing them.
- Build what the Build box asks for, in the repository. The tests are the specification: don’t edit them, make them pass.
- Break it: each unit includes an experiment that shows where the method fails.
- Push your work and ask for a review.
Setup, once
Section titled “Setup, once”You need Python 3.11 or later, git and uv.
git clone https://github.com/d99-dev/ai-learncd ai-learn/AI-courseuv sync # creates .venv with NumPy, Matplotlib and pytestuv run pytest # red at first: that's the pointCourse map
Section titled “Course map”Weeks are grouped in arcs. Each arc opens with the foundations it needs.
| Arc | Weeks | Builds | Status |
|---|---|---|---|
| 0 · Setup | 0 | A gradient checker you can trust | written |
| 1 · Learning from data | 1–3 | Linear, logistic and softmax regression | next |
| 2 · Neural networks | 4–6 | Autograd, an MLP, optimisers | planned |
| 3 · Classical toolbox | 7–9 | Trees and boosting, PCA and EM, evaluation | planned |
| 4 · Language models | 10–12 | A bigram model, attention, a small GPT | planned |
| 5 · The modern LLM stack | 13–17 | LoRA, retrieval, evaluation, serving | planned |
| 6 · Small models | 18 | Distillation, pruning, a state-space layer | planned |