Knowledge map
Every page of the four parts and twelve chapters is here. Hover a page (on a phone, tap it once) to see what to read before it and what it opens up. You can also overlay a study route, or check where you are in the book.
Browse labs on GitHub ↗Part 1
Understand LLMs
What is an LLM, what is it made of, and why is each part designed the way it is?
Model Architecture
- 3.1 From RNNs to Attention Beginner
- 3.2 Attention Basics Beginner
- 3.3 Positional Encoding Explained Intermediate
- 3.4 Transformer Block Explained Intermediate
- 3.5 Modern LLM Architecture Intermediate
- 3.6 Efficient Attention Intermediate
- 3.7 Mixture of Experts (MoE) Intermediate
- 3.8 Long Context Advanced
- 3.9 State Space Models and Hybrids Advanced
Part 2
Train LLMs
How do you train a model on a finite budget of compute and data, then teach it to follow instructions and reason?
Part 3
Deploy and apply
How do you run a model fast and cheaply, and turn it into a reliable application?
Inference and Serving
- 7.1 Your first inference service Beginner
- 7.2 Decoding and Sampling Beginner
- 7.3 KV Cache and Inference Performance Intermediate
- 7.4 Prefix Caching and PD Disaggregation Intermediate
- 7.5 Model Quantization Intermediate
- 7.6 LLM Inference Serving Intermediate
- 7.7 Continuous Batching and PagedAttention Intermediate
- 7.8 Speculative Decoding Intermediate
Applications
- 8.1 Your first agent Beginner
- 8.2 Prompt Engineering Intermediate
- 8.3 Structured Outputs and Function Calling Intermediate
- 8.4 RAG in Practice Intermediate
- 8.5 Agents and Tool Calling in Practice Intermediate
- 8.6 Agent context and memory Intermediate
- 8.7 Agent Evaluation Intermediate
- 8.8 MCP and the Tool Ecosystem Intermediate
Part 4
Evaluate, secure, look ahead
How do you know whether a model is good and safe, and where is the technology heading?