LLM Post-training, from the ground up
A long-form, interactive explainer
A pre-trained language model is a brilliant autocomplete and a terrible assistant. It will happily continue your prompt with more questions, drift off topic, or produce something confidently wrong. Post-training is the second half of the story — the set of techniques that take that raw next-token predictor and turn it into something helpful, honest, and (lately) able to reason.
We follow the field in the order it actually developed: supervised fine-tuning and instruction tuning, then reinforcement learning from human feedback (reward models, PPO, and the whole policy-gradient family), then the offline-preference wave that collapsed RLHF into a single loss (DPO and its cousins), and finally the reasoning era— RL from verifiable rewards, o1 and DeepSeek-R1, GRPO and its 2026 refinements, and agentic tool-use RL.
Only basic machine-learning knowledge is assumed — and a little familiarity with how a transformer is pre-trained helps. Every term gets defined the first time it shows up; hover any underlined word for a tooltip, or jump to the glossary at any time. There are interactive widgets throughout: a PPO clipping objective you can bend, a KL leash you can loosen, a reward you can hack until it collapses, and a GRPO group you can resample.
Scope note: this explainer is about post-training only. How the base model was built is covered in the sibling LLM Pre-training explainer; how the finished model runs on a GPU is covered in LLM & vLLM Inference.
Contents
Foundations & framing
Instruction tuning & supervised fine-tuning
RLHF & the preference era
- 08Learning from human preferences— Christiano 2017 and the pairwise idea
- 09Optimizing against the reward— Chasing a reward without breaking the model
- 10RLHF scales to language— Summarization, InstructGPT, and the 3-step recipe
- 11Reward models— Bradley–Terry and what an RM really learns
- 12RLAIF & Constitutional AI— AI feedback and scalable oversight
RL fundamentals & PPO
- 13Policy gradients & REINFORCE— How a reward becomes a weight update
- 14The baseline trick— A free fix for REINFORCE's noisy updates
- 15Value & advantage— The critic, and 'better than expected' as a signal
- 16Generalized advantage estimation— One dial between noisy truth and smooth guess
- 17TRPO to PPO— Trust regions and the clipped surrogate
- 18PPO for RLHF in practice— The KL-to-reference penalty and the loop
Offline & direct preference optimization
RLVR & the reasoning era
- 23Bootstrapping reasoning— STaR, self-consistency, and rejection-sampling FT
- 24Process vs outcome rewards— Let’s Verify Step by Step, PRM vs ORM
- 25Inference scaling & o1— Test-time compute and the reasoning model
- 26RL from verifiable rewards— Verifiers, graders, and RLVR
- 27GRPO & DeepSeek-R1— Group-relative advantage and critic-free RL
Modern algorithms, agentic RL & the frontier
- 28GRPO refinements— DAPO, Dr.GRPO, VAPO, RLOO, REINFORCE++
- 29Scaling open post-training— Tülu 3, Llama 3, Qwen, and Kimi
- 30Agentic & tool-use RL— Multi-turn trajectories and the 2026 frontier
- 31On-policy distillation— A dense teacher signal on the student's own rollouts
- 32RL scaling laws— How far does RL compute take reasoning?
- 33Generative reward models— Rewards beyond verifiable domains
- 34GLM-5.2— Long-horizon agentic RL with anti-hacking