Phase 10: Frontier AI engineering
The newer ideas that decide cost, speed and trust. Models now think before answering, caches decide your bill, small drafts speed up big models, and preference data shapes behaviour. Teams that understand these levers ship faster and cheaper, and know when a benchmark number can be trusted. Each lesson turns one idea into arithmetic you can check yourself.
After this phase you can
- Work out when extra thinking or majority voting buys accuracy, and when it makes things worse
- Order a prompt so a prefix cache hits, and estimate the saving
- Compute speculative-decoding speed-up, DPO loss and pass@k with an error bar by hand
Before you start: Phases 3 and 8, especially attention, the KV cache and fine-tuning. Basic Python and school maths. No GPU or API key is needed.
Lessons in this phase
- Reasoning Models and Test-Time Compute Advanced · 10 min
A reasoning model spends extra tokens thinking before it answers, and test-time compute is the idea that you can buy better answers with more thinking at inference time instead of a bigger model.
- Context Engineering and Prompt Caching Intermediate · 10 min
Context engineering is choosing exactly what goes into the model's window and in what order, and prompt caching makes the unchanging front part of that window much cheaper to resend.
- Speculative Decoding Advanced · 9 min
Speculative decoding lets a small, fast draft model guess several tokens ahead, then has the big model check them all in one pass, so you get the big model's exact output faster.
- Preference Tuning: RLHF and DPO Advanced · 11 min
Preference tuning teaches a model which of two answers people prefer, either with a separate reward model plus reinforcement learning (RLHF) or directly with a simple loss (DPO).
- Distillation and Synthetic Data Intermediate · 9 min
Distillation trains a small student model to copy a big teacher's output, and synthetic data uses a model to write training examples, which only helps when you filter hard.
- Evaluating Generative Models and Benchmarks Advanced · 10 min
To trust a model score you need the right metric (pass@k for code), an error bar, and proof that the test questions were not in the training data.