Build a Production Inference Engine from Scratch
The engine that serves a language model, built and verified one layer at a time.
The engines that serve large language models are treated as black boxes. This book opens one. You build a real inference engine a layer at a time: the forward pass, the KV cache, the kernels, the sampler, until a model you loaded yourself generates text on your own machine.
Every listing on these pages is pulled from a real, working repository at a pinned commit, and every command's output was captured from actually running it. Nothing here is typed from memory.
- The Serving Stack
- Speaking OpenAI — The Chat Template and Tool-Calling
- Continuous Batching
- The Paged KV Cache
- Quantization
- The LanguageModel Protocol
- Serving on GPU
- Throughput at Scale