Skip to content
Post-training and alignment Foundation 8 min read

Post-training at 2,000 ft

A pre-trained language model knows a great deal and wants nothing: it continues documents. Post-training is everything done afterwards to turn that document-continuer into an assistant that follows instructions, prefers good answers to bad ones, refuses what it should, and, since 2024, reasons its way to verifiably correct answers. The whole track is three kinds of signal (demonstrations, comparisons, verifiers) fed through two kinds of loss (imitation and reinforcement), with one leash holding the model near where it started.

10,000 ft

The jump from GPT-3 (2020) to ChatGPT (November 2022) was not a bigger network. It was post-training: OpenAI's InstructGPT paper showed that labellers preferred a 1.3B-parameter model fine-tuned on human feedback to the 175B-parameter GPT-3 it was built on (Ouyang et al., 2022). Since then post-training has grown from a thin finishing layer into a second training regime: instruction tuning, preference optimisation, reinforcement learning from human and AI feedback, and reinforcement learning against verifiers that produced the reasoning models of 2024–2026 (reasoning models). It sits between pre-training and application engineering, borrows its algorithms from reinforcement learning, and is where most of what people call "alignment" is actually implemented (the alignment problem).

The whole of post-training in one picture

From base model to assistant: the post-training pipeline
From base model to assistant: the post-training pipeline. Base model predicts the next token of internet text, SFT imitate demonstrations (masked cross-entropy), Preference data which of two answers is better?, Reward model scalar score r(x, y), RL against the RM PPO / REINFORCE + KL to the SFT model, Direct preference optimisation (DPO and friends), RL with verifiable rewards (maths, code, tests)From base model to assistant: the post-training pipeline. Base model predicts the next token of internet text, SFT imitate demonstrations (masked cross-entropy), Preference data which of two answers is better?, Reward model scalar score r(x, y), RL against the RM PPO / REINFORCE + KL to the SFT model, Direct preference optimisation (DPO and friends), RL with verifiable rewards (maths, code, tests)

Every box answers the same question differently: where does the training signal come from?

Stage The signal The loss What it mainly changes Scale in published recipes
Instruction tuning (SFT) Demonstrations: a prompt and an ideal answer Cross-entropy on the answer tokens only Format, register, turn-taking, when to stop InstructGPT: about 13k prompts; Llama 2: 27,540 annotations; Tülu 3: 939,344 prompts
Reward modelling Comparisons: answer A is better than B Bradley–Terry logistic loss on score differences Nothing in the policy yet; it builds the judge InstructGPT: 33k prompts ranked 4–9 ways; Llama 2: over 1M binary comparisons
RLHF (PPO and kin) The reward model's score of the policy's own samples Policy gradient + KL penalty to the SFT model Which of the answers it can already write it now prefers InstructGPT: 31k prompts, 256k episodes
Direct preference optimisation The comparisons themselves A logistic loss on log-probability ratios The same as RLHF, without a reward model or sampling Zephyr, Tülu ⅔, most open chat models of 2023–2025
RL with verifiable rewards A checker: unit tests pass, the answer equals 42 Policy gradient (GRPO and variants) Long chains of reasoning that end in correct answers DeepSeek-R1, Tülu 3 RLVR

Numbers are from the papers: InstructGPT, Llama 2, Tülu 3.

The one equation behind most of the track

Almost every method here is a way of solving, approximately, the same problem: make the policy \(\pi\) score well under some reward \(r\) while staying close to a reference model \(\pi_{\text{ref}}\) (usually the SFT model),

\[ \max_{\pi}\; \mathbb{E}_{x\sim\mathcal{D},\,y\sim\pi(\cdot\mid x)}\big[r(x,y)\big] \;-\; \beta\, \mathrm{KL}\big(\pi(\cdot\mid x)\,\|\,\pi_{\text{ref}}(\cdot\mid x)\big). \]

Its exact solution is \(\pi^*(y\mid x) \propto \pi_{\text{ref}}(y\mid x)\,e^{r(x,y)/\beta}\): re-weight what the model already says by how good it is. PPO approaches that target by sampling and climbing; DPO solves for it in closed form from comparisons; best-of-\(n\) approximates it at inference time; RLVR uses a checker as \(r\). SFT is the odd one out: it has no reward, only imitation, and it builds the \(\pi_{\text{ref}}\) the others start from.

Three ideas recur on every page and are worth holding from the start:

  1. The model can only be steered towards what it can already do. Post-training mostly re-weights behaviours that pre-training made possible. LIMA reached strong chat quality from 1,000 examples (Zhou et al., 2023); imitation data could not add capabilities the base model lacked (Gudibande et al., 2023).
  2. Every learned judge can be gamed. Optimise hard against a reward model and the true quality first rises and then falls (Gao et al., 2022). The KL leash, early stopping, better reward models and verifiable rewards are all answers to this one problem.
  3. Humans disagree, so the ceiling is the agreement rate. InstructGPT's labellers agreed with each other about 73% of the time; its reward models predicted held-out labellers' choices 69.6% of the time. Post-training optimises a noisy, partial picture of what people want, and the noise has a shape (length, confidence, flattery) that the model will find.

The map of the track

Arrows mean "read this first". The left half is the classic 2022 recipe (SFT, reward model, PPO); the middle is its 2023–2024 simplifications; the right half is where the field went next.

Post-training: how the pages connect
Post-training: how the pages connect. Instruction tuning (SFT), LoRA and QLoRA, Reward models and preference data, RLHF with PPO, DPO and direct preference optimisation, Constitutional AI and RLAIF, RL with verifiable rewards: GRPO, Distillation and synthetic data, Merging and continual learning, closed form, AI labels, verifier as rewardPost-training: how the pages connect. Instruction tuning (SFT), LoRA and QLoRA, Reward models and preference data, RLHF with PPO, DPO and direct preference optimisation, Constitutional AI and RLAIF, RL with verifiable rewards: GRPO, Distillation and synthetic data, Merging and continual learning, closed form, AI labels, verifier as reward

How to work through this track

The track has two units. Unit 1 is the classic pipeline, taught in the order it runs. Unit 2 is what replaced or extended each piece. Times are for studying properly: deriving the maths, running the code, answering the questions.

  1. Instruction tuning (SFT) (60 min). The objective, chat templates, loss masking, where the data comes from and how little of it you need.
  2. Reward models and preference data (60 min). Bradley–Terry, collecting comparisons, evaluating a judge, and overoptimisation.
  3. RLHF with PPO (90 min). The KL-regularised objective, policy gradients, clipping, value functions and GAE, and the implementation details that make it work.
  4. DPO and direct preference optimisation (90 min). The closed-form trick, its derivation, its failure modes and the IPO/KTO/ORPO/SimPO family.
  5. RL with verifiable rewards: GRPO and reasoning (90 min). Group-relative advantages and how RL on checkable tasks produced reasoning models.
  6. Constitutional AI and RLAIF (60 min). Replacing human labels with model judgements guided by written principles.
  7. Parameter-efficient fine-tuning: LoRA and QLoRA (60 min). How to do all of the above on one GPU. Read it earlier if you want to run things now.
  8. Distillation and synthetic data (60 min). Teacher models as the data source for every stage.
  9. Model merging and continual learning (60 min). Combining fine-tunes and fighting forgetting.

A fast path for a builder who wants to fine-tune this week: pages 1, 7 and 4, then the LoRA project. A researcher's path: 1–5 in order, with the policy gradients and actor-critic and PPO pages from the RL track beside page 3.

Post-training in ten dates

Date Event Read
Jun 2017 Christiano et al. learn a reward from human comparisons; a simulated robot learns a backflip from 900 queries RLHF with PPO
Sep 2019 Ziegler et al. apply the same recipe to GPT-2 RLHF with PPO
Sep 2020 Learning to summarize from human feedback: a 1.3B RLHF model beats a supervised model ten times its size reward models
Sep 2021 FLAN: instruction tuning on 60+ datasets improves zero-shot performance on unseen tasks SFT
Mar 2022 InstructGPT: SFT → reward model → PPO becomes the standard recipe RLHF with PPO
Nov 2022 ChatGPT launches, trained with the InstructGPT recipe the assistant era
Dec 2022 Constitutional AI: AI feedback replaces human harmlessness labels Constitutional AI
May 2023 DPO: preference learning without a reward model or RL DPO
Feb 2024 GRPO introduced in DeepSeekMath RLVR
Jan 2025 DeepSeek-R1: large-scale RL with verifiable rewards produces an open reasoning model RLVR

Prerequisites from other tracks

The five best resources for this track

Where this leads