B.1 The course path
This path is the whole course in one reading order: a single LLM system, called forge in the reference solutions, built end to end in Python, Rust, Go, and C. It does not follow the chapter order of AI Engineering. Instead it interleaves sections from that book with the mathematics, systems, infrastructure, and craft sections from the other books in the library, in the order the system needs them. A section is read when the component it explains is about to be built, so every idea arrives with a reason to care about it.
Concepts from other sections (11)
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.
- Architecture decision record (ADR): a short, numbered, append-only file recording one hard-to-reverse decision with its context, consequences, and rejected alternatives. Read more: 12.1 Architecture decision records in Software Engineering
- Backpropagation through time (BPTT): reverse-mode differentiation of the recurrence unrolled over time, with weights shared across steps. Read more: 9.1 Vanilla RNN with manual BPTT and truncation
- beam search: keeping the best prefixes by summed log-probability, ranking all extensions together at each step. Read more: 10.4 Beam search, generic over a step function
- LoRA: a frozen Linear plus a trainable low-rank update . Read more: 12.6 LoRA: low-rank adaptation with PiSSA initialization and merging
- Model zoo: the manifest-driven report that scores every model family in its own unit, one row per entry. Read more: 12.7 The evaluation harness and the model zoo
- KV cache: per-layer storage of past keys and values, so each decode step processes only the new token. Read more: 21.2 The KV cache, incremental decoding, and generate
- Constrained decoding: masking, at every step, every token that would take the output outside an allowed language. Read more: 23.10 Tool calls and constrained decoding
- continuous batching: re-forming the batch at every step so finished requests leave and waiting ones join immediately. Read more: 23.3 Continuous batching scheduler with priority and preemption
- 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
- Design review: a reader who did not write the document checking it against a rubric and returning comments and a decision. Read more: 1.1 Design review: the tracer and the serving platform in Systems Engineering
The system grows in passes. Pass 1 builds the thinnest version of every layer and runs it end to end: a byte bigram fitted by counting, a Rust engine that streams completions from its checkpoint, a Go gateway, a deployment on a local Kubernetes cluster, and one trace across the services. Every later pass deepens one or more layers behind contracts that do not change, so after each pass the system still runs end to end, and a regression anywhere shows up as a broken path you already understood.
Before you begin
Section titled “Before you begin”Read the Start here page of AI Engineering first; it shows the routes through the book and its contents. Then read The system the solutions build, the map of every component, its language, its solution, and the contracts it meets at. You should be able to name each component and the contract it serves before starting Pass 0.
The passes
Section titled “The passes”Each pass has an opening page that lists its sections in reading order, with what you should be able to explain after each, and ends with a page describing what the system does once the pass is complete.
- Pass 0: Setup. The toolchain, the Python and numpy, shell, git, and make that every later build uses, and a CI gate that lints every commit message.
- Pass 1: The tracer. A thin system through every layer: matmul, the byte bigram, the Rust engine, the Go gateway, containers on kind, one trace, a first incident drill, and a first architecture decision record.
- Pass 2: Foundations. The precalculus, calculus, linear algebra, probability, numerics, and optimization the autograd rests on, then the autograd itself, which retrains the tracer’s bigram by gradient descent.
- Pass 3: Tokens and data. BPE, WordPiece, and Unigram tokenizers that match Hugging Face exactly, a deterministic and auditable corpus pipeline, and the n-gram and neural language models.
- Pass 4: Sequence models. Recurrent language models trained with truncated BPTT, encoder-decoders, attention, and beam search.
- Pass 5: The transformer. The 2017 transformer, GPT, BERT, ELECTRA, LoRA, the model zoo, and the modern Llama-family block that loads SmolLM2 and matches Hugging Face.
- Pass 6: Inference and kernels. Sampling, the KV cache, quantization, speculative and constrained decoding in Python, with optional C kernels.
- Pass 7: The serving platform. The Rust engine with continuous batching and disaggregation, the production gateway, and the platform on kind with its observability stack and SLOs.
- Pass 8: Durable execution. The corpus build and training run as workflows on the course’s own durable engine.
- Pass 9: Capstone training. Mixed precision and accumulation, then a ten-million-parameter model trained, evaluated, released through a workflow, and served.
- Pass 10: Agents. An agent SDK on the engine’s tool calls, retrieval over the system’s own docs, evaluation, and usage policy at the gateway.
- Pass 11: Operating the system. The v1.0.0 release, migrations, incident drills, security review, design reviews, and a mock customer engagement.
- Pass 12: Multimodal. Signal and image math, vision encoders, Whisper speech recognition, and multimodal evaluation.
Building every pass takes about 67 weeks at ten to twelve hours a week. The stages themselves, with the files each one reads, are in this path’s manifest, path.tsv, which includes every pass’s manifest in turn.
Stages
Section titled “Stages”Generated from path.tsv.
| Stage | Read | Done when |
|---|---|---|
| 0 | The system the course builds AI Engineering The System the Solutions Build | You can name every component, its language, and the contract it serves. |
| Part | B.2 Pass 0: Setup | Every stage of that path |
| Part | B.3 Pass 1: The Tracer | Every stage of that path |
| Part | B.4 Pass 2: Foundations | Every stage of that path |
| Part | B.5 Pass 3: Tokens and Data | Every stage of that path |
| Part | B.6 Pass 4: Sequence Models | Every stage of that path |
| Part | B.7 Pass 5: The Transformer | Every stage of that path |
| Part | B.8 Pass 6: Inference and Kernels | Every stage of that path |
| Part | B.9 Pass 7: The Serving Platform | Every stage of that path |
| Part | B.10 Pass 8: Durable Execution | Every stage of that path |
| Part | B.11 Pass 9: Capstone Training | Every stage of that path |
| Part | B.12 Pass 10: Agents | Every stage of that path |
| Part | B.13 Pass 11: Operating the System | Every stage of that path |
| Part | B.14 Pass 12: Multimodal | Every stage of that path |