Diagram index
Every diagram in the workshop and the handbook, in one place — useful for lecturing from, or for revision.
All of them are generated, not drawn by hand: tools/make_diagrams.py
builds them with the small kit in tools/svgkit.py. Change the generator and
run make diagrams; CI fails if a committed SVG has drifted from its source.
They are plain SVG, so they scale to any projector, work offline, and adapt to light and dark themes. Reuse them in your own slides — code is MIT, prose and figures are CC BY 4.0.
- Foundations
- Hardware and efficiency
- Generating text
- Building systems
- Agents
- Planning your work
- Handbook figures
- How we got here
- What attention does
- Inside a transformer
- The full training lifecycle
- Phase 0: making the data
- Scaling laws
- Phase 2: post-training
- Adaptation options, cheapest first
- Distillation and Mixture of Experts
- Which kind of model is this?
- The ecosystem as a stack
- Choosing a tool
- MCP: why a protocol was needed
- The training track
- The agents track
- The mathematics
- Language
- Who builds the models
Foundations
The next-token generation loop
Notebook 01. The one idea everything rests on.
Tokenization
Notebook 01. Why “how many r’s in strawberry” is hard, and why a tool fixes it.
Open weights vs. open source
Notebook 01, and the open-weight models guide.
Hardware and efficiency
Where the memory goes
Notebook 02. Weights dominate — until the context gets long.
How 4-bit quantization works
Notebook 05.
How LoRA works
Notebook 11.
Generating text
The four steps from messages to text
Notebook 03. Step 4 is the one everybody forgets.
Sampling
Notebook 04. Why top-p usually beats top-k.
Thinking mode
Notebook 04.
Building systems
One API, four runtimes
Notebook 06, and the deployment guide.
The tool-calling round trip
Notebook 07. The model never executes anything.
Embeddings place meaning in space
Notebook 08.
The four stages of RAG
Notebook 09. Measure retrieval and answers separately.
Agents
The agent loop
Notebook 10, and the agentic AI guide. This is the whole idea.
The chain-to-agent spectrum
Notebook 10. Most production “agents” should have been chains.
Prompt injection
Notebook 10, and privacy and safety.
Planning your work
Prompt, RAG, tools, or fine-tune?
Notebook 11. Work down the list and stop at the first yes.
The four-day roadmap
Handbook figures
These accompany the handbook, which is background reading rather than hands-on work.
How we got here
Chapter 1. Why each piece was invented.
What attention does
Inside a transformer
The full training lifecycle
Chapter 3. The single most useful figure in the handbook.
Phase 0: making the data
Scaling laws
Chapter 3. Why good small models exist.
Phase 2: post-training
Chapter 3. SFT, RLHF and DPO.
Adaptation options, cheapest first
Distillation and Mixture of Experts
Which kind of model is this?
Chapter 4. Foundation vs frontier, and the axes people conflate.
The ecosystem as a stack
Chapter 5. Tools in the same layer are alternatives; tools in different layers compose.
Choosing a tool
MCP: why a protocol was needed
The training track
One training step
Notebook 13. Every trainer you will ever use is this loop with more bookkeeping, and it reports exactly four numbers.
Loss masking
Notebook 14. Which tokens the model is graded on, and which it only reads.
RLHF versus DPO
Notebook 15, and chapter 3. Same data; DPO removes the reward model and the RL loop.
Five loss curves, five decisions
Notebook 16. In three of the five, the train curve alone looks acceptable.
The agents track
Four ways to remember
Notebook 17. The model has no memory; these are four ways your code fakes it.
A plan is a graph, not a list
Notebook 18. Which is why one failure blocks its descendants and nothing else.
Four ways to wire several agents
Notebook 19. Costs rise left to right. Start at the left.
Outcome is half the picture
Notebook 20. The dangerous quadrant is the one an outcome-only suite calls a pass.
The mathematics
One attention operation, end to end
Notebook 21 and chapter 7. Every arrow is a matrix multiply or an elementwise step.
RoPE: position as rotation
Why the score ends up depending on the gap between tokens, not on where they are.
A pre-norm block
The residual stream runs straight down; everything else is a correction to it.
Language
The tax on Kazakh and Russian
Notebook 22 and the language guide. Each step multiplies the one before it.
Who builds the models
Total parameters versus active parameters
Chapter 8. The number that predicts memory and the number that predicts speed are not the same number.
What a model costs, and which part gets quoted
The disclosed figure covers the final training run. These are the line items it leaves out.
How open is it, really?
Four rungs, not two. Only the top one lets you reproduce the model.