Book IV
LLMs, agents, and post-training
Transformer internals, inference, retrieval, evaluation, agents, alignment, and post-training.
7 chapters · 42 entriesChapters
7Transformer architecture and attention
Build from the transformer block to efficient and sparse attention variants.
Tokens, position, and long context
Understand input representation, positional information, and context extension.
Inference and decoding
Move from decoding policy to cache layout, batching, speculation, and test-time compute.
Post-training, alignment, and safety
Preference learning, verifiable rewards, oversight, threats, and red-team design.
Interpretability and monitoring
Inspect internal mechanisms and reason about monitored chain-of-thought signals.
Fine-tuning and retrieval-augmented generation
Choose adaptation or retrieval, then design and evaluate the resulting system.
LLM application and agent design
Handle failure, safety, tools, authority, and product integration in real applications.