ELLMEngineering Large
Language Models
Download PDF

PUBLIC EDITION

Engineering
Large Language
Models.

Advanced engineering of model execution and behavior.

A systems guide to training, inference, accelerators, distributed infrastructure, and the decisions that connect them.

68 chapters9 parts56 original diagrams
YOUR READING PATH

For engineers familiar with transformers and ML systems. Start with semantic invariants, then choose training, serving, accelerators, or application architecture. Elementary refreshers are separate companions; the four detailed telemetry chapters form an optional reading track at the end of Part VI.

EXPLORE THE BOOK

One system. Nine perspectives.

I

Understanding a Language Model System

Read the introduction →
  1. 01The Model and the System
  2. 02Text, Tokens, and the Prediction Objective
  3. 03Inside a Transformer Decoder
  4. 04How Training Changes the Model
  5. 05What the Model Keeps During Generation
  6. 06Estimating Memory and Runtime
  7. 07Evaluating a Change to the System
II

Training Systems, Data, and Adaptation

Read the introduction →
  1. 08Designing a Training Recipe
  2. 09Data Contracts, Provenance, and Normalization
  3. 10Deduplication, Quality, and Contamination
  4. 11Synthetic Data and Mixture Design
  5. 12Training Data Platform and Release Engineering
  6. 13Applied Data-System Casework
  7. 14Distillation, KL Divergence, and Model Sizing
  8. 15Supervised Adaptation and Low-Rank Training
  9. 16Post-Training and Alignment
  10. 17Reinforcement Learning for Reasoning and Tool Use
III

LLM Inference Systems

Read the introduction →
  1. 18Request Lifecycle, Metrics, and Workload Models
  2. 19Prefill, Decode, and Performance Modeling
  3. 20KV Cache, Paging, and Prefix Reuse
  4. 21Scheduling, Batching, and Admission Control
  5. 22Sampling, Structured Output, and Speculative Decoding
  6. 23Parallel, Replicated, and Disaggregated Serving
  7. 24Quantization, Compression, and Adapter Serving
  8. 25Production Architecture, Capacity, and Reliability
  9. 26Serving Engines and Cache Backends in Practice
IV

CUDA and Accelerator Programming

Read the introduction →
  1. 27GPU Execution, Memory, and Resource Accounting
  2. 28Host-Device Orchestration, Streams, and CUDA Graphs
  3. 29Hierarchical Matrix Multiplication
  4. 30Reductions, Prefix Scans, and Histograms
  5. 31Softmax, Normalization, Top-K, and Sampling
  6. 32FlashAttention and IO-Aware Exact Attention
  7. 33Blackwell Pipelines and Modern Attention Kernels
  8. 34CUDA Kernels for LLM Inference
  9. 35Kernel Engineering, Profiling, and Correctness
  10. 36Accelerator Ecosystems Beyond CUDA and NVIDIA
  11. 37Model Portability and Compiled State
V

Distributed ML Systems

Read the introduction →
  1. 38Communication Models, Collectives, and Topology
  2. 39Data Parallelism, ZeRO, and Fully Sharded Training
  3. 40Tensor, Sequence, and Context Parallelism
  4. 41Pipeline Parallelism and Hybrid Plans
  5. 42Mixture-of-Experts and Sparse Communication
  6. 43Distributed Inference and Stateful Placement
  7. 44Distributed Reinforcement Learning and Policy Freshness
  8. 45Distributed Checkpoints, Recovery, and Elasticity
  9. 46Cluster Scheduling, Observability, and Distributed Diagnosis
VI

Application Architecture and Verification

Read the introduction →
  1. 47An Engineering System Design and Review Method
  2. 48RAG, Vector Search, and Evaluation Pipelines
  3. 49Building and Evaluating a Bounded Agent Loop
  4. 50Exact Streaming Queries and Time Windows
  5. 51Online Statistics and Sampling
  6. 52Heavy Hitters and Probabilistic Sketches
  7. 53Building a Streaming Telemetry Service
VII

Architectural Alternatives and Adoption

Read the introduction →
  1. 54Efficient Frontier Models and Reasoning Training
  2. 55Serving, Attention, and Memory Hierarchies
  3. 56Multimodal Representations: Images, Video, and Speech
  4. 57Diffusion Transformers, Flow Matching, and Parallel Generation
  5. 58Multimodal and Tool-Using Systems
  6. 59From Research Result to Production Decision
VIII

Engineering Decisions and Operations

Read the introduction →
  1. 60Executive Technical Communication
  2. 61Operating Mechanisms for ML Systems
  3. 62Incident Leadership and High-Risk Change
  4. 63Capacity Strategy and Migration Economics
IX

Field Reference

Read the introduction →
  1. 64End-to-End Learning Lab and Capstone
  2. 65Formula and Capacity Sheet
  3. 66CUDA Engineering Checklist
  4. 67Diagnostic Question Bank
  5. 68Glossary and Decision Index

Optional companions