The project ladder¶
Reading builds recognition; building builds understanding. This track is a ladder of 44 projects, from a 150-line autodiff engine to a production agent, each with its prerequisites, a time budget and a test for "done", plus four fully guided builds and a bank of interview-grade questions to check yourself against.
10,000 ft
Every other track on this site explains an idea; this one makes you prove you have it. The ladder is ordered so that each rung uses what the previous one built: the autodiff engine of micrograd is the engine inside the tiny GPT; the GPT is the kind of model you fine-tune with LoRA; the fine-tuned model is the kind you put behind retrieval and tools. Further up, the same habits (a baseline first, automated checks, one change per run, an honest held-out number) carry you into reproducing GPT-2, preference optimisation, RL on verifiable rewards, interpretability and long-horizon agents. Nobody needs all 44 projects. Everybody who wants to master the field needs a handful done properly, end to end, with numbers they would defend.
The whole track in one picture¶
The four guided projects are written as full step-by-step builds on this site, with milestones, real outputs to compare against, failure tables and stretch goals. The other 40 rungs are specified projects: a goal, the prerequisites, a reference implementation or course to check yourself against, and a definition of done. They point to the pages that teach the ideas.
How to work through this track¶
A method that works for every project¶
- Write the success criterion before the code. "Validation loss at or below 1.50", "exact match above the few-shot baseline by more than the noise", "recall@5 of 0.85 on 30 paraphrased questions". A project without a number has no end.
- Measure a baseline. A count-based model, a prompt, BM25, a random policy. It tells you what "learning" must beat and catches pipelines that are broken but plausible.
- Build the smallest version that runs end to end, with tiny data and a tiny model. End to end first, good later.
- Add the cheap checks that catch silent bugs. Initial loss near \(\ln(\text{classes})\), overfitting one batch, a numerical gradient check, a causality test, shape assertions, deterministic re-runs. Each guided project shows which checks matter for it (a recipe for training).
- Scale and sweep, one change per run, and log every run with its configuration.
- Write it up: what you built, the numbers, what failed and why. A page you could show an interviewer is the real deliverable, and writing it is where half the understanding happens (how to study AI so it sticks).
Paths through the ladder¶
| if you are... | do these, in order | time |
|---|---|---|
| new to ML engineering | 1, 2, 5 (micrograd), 6, 7, 9, 10 (tiny GPT) | 6 to 8 weeks part-time |
| a software engineer shipping LLM features | 5, 10, 14 (RAG + agent), 15, 16, 13 (LoRA), 17, 34 | 4 to 6 weeks |
| aiming at research engineering | 5, 10, 11, 26, 27, 28, 30, 31, 36 | 3 to 4 months |
| a founder-engineer who wants the whole map | the four guided projects, then 15, 19, 26, 31, 36, 44 | about 3 months part-time |
Interleave the self-assessment: after each project, answer the questions for the tracks it touched without looking, then check.
Every page in the track¶
-
This page: 44 projects in four tiers with prerequisites, time budgets and definitions of done.
-
A scalar autodiff engine and neural-network library in about 150 lines of plain Python, trained to 98.5% held-out accuracy.
-
Project: build and train a tiny GPT
A character-level GPT in PyTorch with four automated checks, trained on Shakespeare against published targets.
-
Project: fine-tune a model with LoRA
Teach a 494M-parameter instruction model exact JSON extraction, measured on a held-out test set built before training.
-
Project: a RAG assistant and a tool-using agent
Hybrid retrieval over this site, measured with two golden sets; checked citations; an agent loop with budgets and tests.
-
Self-assessment: interview-grade questions
158 questions across every track, each with a model answer and a link to the page that teaches it.
The ladder¶
Each table row is one project. Needs lists projects (by number) or pages to finish first. Time assumes focused hours. Done when is the test you must pass; if you cannot measure it, you are not done.
Tier 0: foundations¶
| # | project | you build | needs | time | done when | learn from |
|---|---|---|---|---|---|---|
| 1 | Linear regression, three ways | closed-form normal equations, batch gradient descent and SGD in NumPy on a real dataset | linear regression | 4 h | all three agree to 4 decimal places; you can explain why GD needs feature scaling | Optimisation |
| 2 | Logistic regression with honest evaluation | a classifier with a proper train/validation/test split, a confusion matrix, ROC and a calibration plot | 1 | 6 h | you report test metrics with confidence intervals and find one leakage bug you planted on purpose | Logistic regression, metrics and leakage |
| 3 | Trees versus a tuned baseline on tabular data | random forest and gradient boosting (XGBoost or scikit-learn) on a tabular dataset with categorical features | 2 | 8 h | boosting beats your logistic regression by a margin larger than cross-validation noise, and you can say which features drove it | Trees and ensembles, features |
| 4 | Unsupervised structure | k-means (written yourself) and PCA on image data; a 2-D map with t-SNE or UMAP | 1 | 6 h | your k-means matches a library's objective value; you can explain what the first three principal components encode | Clustering, PCA, t-SNE, UMAP |
| 5 | micrograd (guided) | a scalar reverse-mode autodiff engine, a neural-network library and a training loop, no NumPy | derivatives | 4 to 6 h | gradients match finite differences to 1e-6; 98.5% held-out accuracy on two moons | Project page |
| 6 | An MLP on MNIST with hand-written backprop | a vectorised two-layer network in NumPy: forward, backward, SGD with momentum, no autograd | 5 | 8 h | a numerical gradient check passes; test accuracy above 97% | Backpropagation, initialisation |
| 7 | makemore: character language models | a bigram counter, a neural bigram, then an MLP language model on a list of names | 5 | 8 h | the neural bigram converges to the count model's loss; the MLP beats it on validation | Language modelling, Karpathy's makemore |
| 8 | A CNN that trains well | a small ResNet-style CNN in PyTorch on CIFAR-10 or Fashion-MNIST, with augmentation and a learning-rate schedule | 6 | 10 h | you reproduce a documented baseline accuracy within 1 point and can show the effect of each training-recipe change | CNNs, residual networks, training recipe |
Tier 1: core¶
| # | project | you build | needs | time | done when | learn from |
|---|---|---|---|---|---|---|
| 9 | A BPE tokeniser | byte-level BPE training, encoding and decoding, with GPT-style regex pre-splitting | 7 | 6 h | round-trips any UTF-8 text exactly; your merges reproduce a reference on a small corpus | Tokenisation, minbpe |
| 10 | Tiny GPT (guided) | a decoder-only transformer in PyTorch, trained on Shakespeare | 5, 7 | 8 to 10 h | four tests pass; validation loss at or below 1.95 (laptop) or 1.50 (GPU) | Project page |
| 11 | GPT in NumPy with every backward pass | the same model with your own array autodiff and hand-derived gradients | 6, 10 | 12 h | every gradient passes a numerical check; the model beats a 4-gram baseline | Build a GPT from scratch |
| 12 | A decoding lab | greedy, beam, temperature, top-k, top-p and min-p sampling over your GPT, with a KV cache | 10 | 6 h | cached and uncached logits match to 1e-5; you can show repetition and diversity trade-offs with numbers | Decoding, KV cache |
| 13 | LoRA fine-tune (guided) | an extraction skill taught to Qwen2.5-0.5B-Instruct with TRL + PEFT or MLX-LM | 10 | 8 h | beats the few-shot baseline on a held-out test by more than the noise; failures bucketed | Project page |
| 14 | RAG assistant and agent (guided) | hybrid retrieval over a Markdown corpus, cited answers, a tool-using loop with tests | 2 | 10 to 12 h | recall@k reported on a paraphrased golden set; harness tests pass offline | Project page |
| 15 | An eval harness with a calibrated judge | a golden set, programmatic checks and an LLM judge whose agreement with your labels you measure | 14 | 8 h | judge-human agreement reported (Cohen's κ) on at least 50 labelled items; the suite runs in CI | Evals in practice, statistics for evals |
| 16 | Structured extraction that never breaks | schema-constrained outputs with validation, retries and a fallback, over messy real documents | 14 | 6 h | 100% schema-valid outputs on 200 documents; field accuracy measured against labels | Structured outputs |
| 17 | An MCP server for your own data | a Model Context Protocol server exposing search and one write action, with the official Python SDK | 14 | 6 h | works from two different MCP clients; the write action requires confirmation | MCP and protocols |
| 18 | Quantise and measure | the same small model at 16, 8, 4 and 3 bits with llama.cpp or MLX | 13 | 5 h | a table of perplexity, task accuracy, memory and tokens/second for each precision | Quantisation, on-device AI |
| 19 | Serve a model and find its limits | a vLLM deployment load-tested at rising concurrency | 18 | 6 h | throughput and p50/p95 latency curves; you can explain the knee with the KV-cache budget | Serving LLMs, compute maths |
| 20 | Bandits and tabular RL | ε-greedy, UCB and Thompson sampling; then value iteration and Q-learning on a grid world | 1 | 8 h | regret curves match theory's ordering; Q-learning converges to the value-iteration policy | Bandits, dynamic programming |
| 21 | DQN on CartPole | replay buffer, target network, ε schedule, on Gymnasium | 20, 6 | 8 h | solves the task across 3 seeds; an ablation shows what the target network buys | Q-learning and DQN, CleanRL |
| 22 | PPO from scratch | clipped-objective PPO with GAE on a continuous-control task | 21 | 12 h | learning curves within the range of a reference implementation across 3 seeds | Actor-critic and PPO, Spinning Up |
| 23 | A VAE | a convolutional VAE on MNIST with the reparameterisation trick | 8 | 6 h | ELBO reported; latent-space interpolations decode to plausible digits | Autoencoders and VAEs |
| 24 | A diffusion model | DDPM on a 2-D toy distribution, then on MNIST; DDIM sampling | 23 | 10 h | the 2-D model recovers the target density; DDIM with 50 steps matches 1,000-step samples visually | Diffusion models, The Annotated Diffusion Model |
| 25 | Zero-shot vision with CLIP | zero-shot classification with a CLIP model, then a linear probe, on a dataset of your choice | 8 | 5 h | zero-shot and linear-probe accuracies reported; prompt-ensembling effect measured | ViT and CLIP |
Tier 2: advanced¶
| # | project | you build | needs | time | done when | learn from |
|---|---|---|---|---|---|---|
| 26 | Reproduce GPT-2 (124M) | real BPE, FineWeb-Edu data, mixed precision, torch.compile, DDP on a rented multi-GPU node |
10, 9 | 2 to 4 days | validation loss and HellaSwag in the range of the reference run | build-nanogpt, llm.c, distributed training |
| 27 | Your own scaling law | 6 to 10 model sizes at 3 token budgets on a fixed dataset | 10 | 2 to 3 days | a fitted \(L(N, D)\) and a prediction for a held-out size that lands within 2% | Scaling laws |
| 28 | A fused kernel | softmax or a fused attention forward in Triton; roofline analysis of your kernel versus PyTorch | 11 | 3 days | correct to 1e-3 against PyTorch; achieved bandwidth or FLOP/s placed on a roofline | Kernels, Triton tutorials, GPU Puzzles |
| 29 | Sharded training | your GPT trained with DDP, then FSDP, on 2+ GPUs | 26 | 2 days | identical loss curves to single-GPU at equal global batch; memory per GPU measured for each mode | Distributed training, PyTorch DDP tutorial |
| 30 | Preferences: reward model and DPO | a Bradley-Terry reward model and a DPO run on a public preference dataset, from your SFT model | 13 | 3 days | reward-model accuracy on held-out pairs; DPO win rate against SFT judged on 200 prompts | Reward models, DPO |
| 31 | RL on verifiable rewards | GRPO on grade-school maths (GSM8K) with a small instruct model, using TRL's GRPOTrainer | 13 | 3 to 5 days | test accuracy improves over the SFT start; you can show reward hacking you found and fixed | RL with verifiable rewards, open-r1 |
| 32 | Speculative decoding | a draft model plus verification on top of your GPT or a small open model | 12 | 2 days | output distribution provably unchanged (tested); measured speed-up at several acceptance rates | Serving LLMs |
| 33 | A mixture-of-experts layer | top-k routing with a load-balancing loss inside your GPT | 10 | 2 days | expert utilisation balanced within 2×; loss at equal active parameters compared with dense | Mixture of experts |
| 34 | Red-team your own agent | a prompt-injection and data-exfiltration test suite against project 14, then defences | 14, 15 | 2 days | attack success rate before and after each defence, with no drop in task success | Guardrails and security, red-teaming |
| 35 | A contamination audit | n-gram overlap and canary checks between a public benchmark and a pre-training corpus sample | 9 | 2 days | contamination rate per benchmark split, and a model's accuracy on clean versus contaminated items | Contamination, pre-training data |
Tier 3: frontier¶
| # | project | you build | needs | time | done when | learn from |
|---|---|---|---|---|---|---|
| 36 | A sparse autoencoder | an SAE on one layer of a small open model's residual stream; interpret 20 features | 10 | 4 days | reconstruction loss and L0 reported; 20 features labelled with top activations and checked by intervention | Interpretability, SAELens, Cunningham et al. |
| 37 | Find a circuit | induction heads and the indirect-object-identification circuit in GPT-2 small, by activation patching | 36 | 4 days | patching results reproduce the published circuit's key heads | TransformerLens, Wang et al., ARENA |
| 38 | A long-horizon coding agent | an agent with file, shell and test tools evaluated on a subset of SWE-bench tasks | 14, 15 | 1 to 2 weeks | resolved rate on your subset with confidence interval; cost and steps per task; failure taxonomy | Long-horizon agents, context engineering |
| 39 | Beyond attention | a small Mamba or linear-attention model versus your GPT at equal compute | 27 | 1 week | loss curves at equal FLOPs; a long-context recall test where they differ | Beyond transformers, mamba |
| 40 | Distillation with synthetic data | a large model generates and filters training data; a small model learns from it | 13, 15 | 1 week | the small model closes a measured fraction of the gap on a held-out eval; you show what filtering contributed | Distillation and synthetic data |
| 41 | nanochat end to end | tokeniser, pre-training, supervised fine-tuning, RL, evaluation and chat inference with nanochat | 26 | 1 to 2 weeks | you can explain every stage's contribution to the final eval report | Post-training at 2,000 ft |
| 42 | An imitation-learning robot policy | a policy trained from demonstrations in simulation with LeRobot | 22 | 1 to 2 weeks | success rate over 50 evaluation episodes; a study of how it scales with the number of demonstrations | Embodied AI and robotics |
| 43 | Reproduce one figure from a recent paper | pick a 2025 to 2026 paper in your area; reproduce its central figure at small scale | any Tier 2 | 1 to 3 weeks | your figure, the paper's, and a written account of every difference | How to read a paper, open problems |
| 44 | Capstone: a production agent | a deployed assistant over real data with retrieval, tools, guardrails, an eval suite in CI, tracing, cost and latency budgets | 14, 15, 34 | 3 to 6 weeks | real users; a weekly eval report; incidents written up; cost per successful task known | Shipping AI products, case study: Jarvis, data in production |
How to choose the next rung
Pick the project whose done when you are least sure you could pass. If every row in a tier looks easy, skip ahead and come back when a higher project exposes a gap. If a project stalls for more than twice its time budget, the cause is almost always a missing prerequisite or a missing check (step 4 of the method), not a missing trick.
What "mastery" looks like after the ladder¶
Doing projects is not the goal; being able to do the next unfamiliar one is. These are the abilities the ladder is designed to build, and the projects that build each:
| ability | evidence you have it | built by |
|---|---|---|
| derive and debug gradients | you can find a wrong backward rule from a failing gradient check | 5, 6, 11 |
| train a model that works the first time | initial loss, overfit test and loss curve all look right before you scale | 8, 10, 26 |
| reason about compute | you predict memory, FLOPs and time for a run before launching it, within 2× | 10, 19, 26, 28 |
| adapt a pre-trained model | you choose between prompting, RAG, LoRA and full fine-tuning with numbers | 13, 14, 30, 40 |
| build reliable systems on models | harness tests, guarded tools, abstention, budgets | 14, 16, 17, 34, 44 |
| evaluate honestly | held-out sets, confidence intervals, contamination checks, calibrated judges | 2, 15, 35 |
| read and reproduce research | a figure from a new paper, reproduced at small scale | 27, 37, 43 |
Prerequisites from other tracks¶
- Before Tier 0: Python and a working environment (your workbench); vectors, matrices and derivatives.
- Before Tier 1: backpropagation, optimisers, attention and the transformer block; probability and cross-entropy.
- Before Tier 2: compute maths, GPU architecture, mixed precision, post-training at 2,000 ft, policy gradients.
- Before Tier 3: the relevant frontier page, plus how to read a paper.
The five best resources for this track¶
- Neural Networks: Zero to Hero — Andrej Karpathy. Projects 5, 7, 9, 10 and 26 as lectures, built live from an empty file. The best single companion to this ladder; the code is in nn-zero-to-hero.
- Stanford CS336: Language Modeling from Scratch — Hashimoto and Liang. Tiers 1 and 2 as a university course: tokeniser, transformer, optimiser, systems, scaling, data and alignment assignments with no starter model code.
- Practical Deep Learning for Coders — fast.ai. Top-down and results-first: the complement to this track's bottom-up builds, and the fastest route to project 8.
- ARENA — Exercises for transformers from scratch, interpretability, RL and evals, with solutions; the natural path for projects 22, 36 and 37.
- Build a Large Language Model (From Scratch) — Sebastian Raschka. A book-length, carefully explained route through projects 9, 10 and 13, with code for every chapter.
Where this leads¶
- Project: build micrograd — start here if you have not built an autodiff engine.
- Self-assessment — find out which tracks to revisit before you climb further.
- Learning paths — how the practice track fits into the reading order for the whole site.
- Keeping up with the frontier — where Tier 3 projects come from, and how to find new ones.