Skip to content

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.

  1. Read the unit in Dense mode. Open the Full blocks for anything that is not obvious.
  2. Answer the checks before revealing them.
  3. Build what the Build box asks for, in the repository. The tests are the specification: don’t edit them, make them pass.
  4. Break it: each unit includes an experiment that shows where the method fails.
  5. Push your work and ask for a review.

You need Python 3.11 or later, git and uv.

Terminal window
git clone https://github.com/d99-dev/ai-learn
cd ai-learn/AI-course
uv sync # creates .venv with NumPy, Matplotlib and pytest
uv run pytest # red at first: that's the point

Weeks are grouped in arcs. Each arc opens with the foundations it needs.

ArcWeeksBuildsStatus
0 · Setup0A gradient checker you can trustwritten
1 · Learning from data1–3Linear, logistic and softmax regressionnext
2 · Neural networks4–6Autograd, an MLP, optimisersplanned
3 · Classical toolbox7–9Trees and boosting, PCA and EM, evaluationplanned
4 · Language models10–12A bigram model, attention, a small GPTplanned
5 · The modern LLM stack13–17LoRA, retrieval, evaluation, servingplanned
6 · Small models18Distillation, pruning, a state-space layerplanned