Appendix B: Reading Paths
The chapters of this book are arranged by topic: tokenizers in one chapter, attention in another, serving in a third. That is the right arrangement for reference, but it is not always the right order for learning. A reading path is a second arrangement laid over the first. It cuts across the chapters, and across the other books in the library, and picks out which sections to read, in what order, and what you should be able to explain when you finish each stage.
Concepts from other sections (3)
This section uses these ideas. Each has a short definition and a link to the section that explains it in full. Tap a dotted term in the text to preview it.
- Service Level Objective (SLO): a target for a defined measure of service behavior over a specified window. Read more: Chapter 13: Engineering Acronyms in Software Engineering
- usage policy: an ordered list of rules that allow or deny inference requests by model, tenant, token cap, or classifier score. Read more: 25.6 Usage policy enforcement
- Probability density function (PDF): for a continuous random variable, a function that integrates to 1, with ; a density value is not itself a probability. Read more: Chapter 13: Probability and Statistics in Mathematics
A path owns no content of its own beyond its opening page and a short account of what the system can do at its end. The sections stay in the chapters and books that own them, so a correction made in a chapter is made in every path that uses it. Nothing is copied.
The course and its passes
Section titled “The course and its passes”The main path is the course: one LLM system, built end to end in Python, Rust, Go, and C, grown in thirteen passes. Each pass is itself a path, and each ends with a page describing what the finished system does at that point.
- Pass 0: Setup: the toolchain, the shell, and a CI gate that every later pass relies on.
- Pass 1: The tracer: a thin system through every layer, from a counted bigram to one trace in Jaeger.
- Pass 2: Foundations: the mathematics and the autograd that retrain the tracer’s model by gradient descent.
- Pass 3: Tokens and data: tokenizers that match GPT-2 and SmolLM2, a deterministic corpus pipeline, and the statistical language models.
- Pass 4: Sequence models: recurrent language models, encoder-decoders, and attention’s first appearance.
- Pass 5: The transformer: the 2017 transformer, its pretraining objectives, and the modern block that loads SmolLM2.
- Pass 6: Inference and kernels: the Python inference stack, with optional C kernels.
- Pass 7: The serving platform: the Rust engine, the production gateway, and the platform on Kubernetes with its SLOs.
- Pass 8: Durable execution: the data pipeline and training run as durable workflows.
- Pass 9: Capstone training: a ten-million-parameter model trained, evaluated, released, and served.
- Pass 10: Agents: agents on the engine’s tool calls, retrieval, evaluation, and usage policy.
- Pass 11: Operating the system: v1.0.0, migrations, incident drills, security, and review.
- Pass 12: Multimodal: images and audio, vision encoders, and Whisper.
How a path is read
Section titled “How a path is read”Every path has a manifest, path.tsv, beside its opening page. Each row of the manifest is one stage: a stage number, a title, the files to read in order, and a “done when” statement that names what you should be able to explain or reproduce once you have read those sections and their solution walkthroughs. A line of the form @<path> includes every stage of another path at that point, which is how the course strings its thirteen passes together. Each pass’s opening page turns its manifest into a reading list, so in practice you read the opening page and follow its links.
Each path also builds into its own PDF, supersource-<path>.pdf. CI attaches every one to the build artifact and to each GitHub Release, and ./scripts/build-book.sh --path <path> builds one locally. A path that includes others gets one PDF part per included path.
Adding a path
Section titled “Adding a path”Adding a path takes five steps, and the build checks them for you:
-
Create
content/courses/ai-engineering/paths/<name>/README.md. Its first#heading is the path’s title. -
Create
content/courses/ai-engineering/paths/<name>/path.tsv, one row per stage, tab-separated:stage <TAB> title <TAB> file[,file...] <TAB> done when@other-pathFiles are repository-relative Markdown, read in the order listed. A line
@other-pathincludes every stage of that path at that point. Lines starting with#are comments. “Done when” is a comprehension outcome (you can explain, derive, or reproduce something), not “read the chapter”. -
Put content in a chapter, even when only one path uses it today. A path directory holds only its manifest, its opening page, and material that is about the path itself, such as a pass’s opening or its “what the system does” page.
-
Run
./scripts/build-book.sh --path <name>. A missing file, an unknown include, or an include cycle fails the build, and CI runs the same assembly. -
Add
outputs/supersource-<name>.pdftosr.yamlunderpackages[].artifactsso releases attach it.
The third rule is the one that keeps the library coherent. If a path ever needs a section that no chapter has, write the section in the chapter where it belongs and link to it from the path.