// Stage 5 · Post-training, Alignment & Reasoning Models
Alignment: RLHF, DPO & Constitutional AI
Reward models, PPO-style RLHF, the DPO family, RLAIF and reward hacking.
about 10 hours7 algorithms4 paperslesson text in progress
01Goals
- Draw the three stages of RLHF
- Derive / understand the DPO loss
- Know about reward hacking and the KL constraint
Do these first: Instruction Tuning & PEFT · Reinforcement Learning Basics
02Algorithms to master
Each card has the original paper, prerequisites and resources.
03Must-read papers
- Deep reinforcement learning from human preferences ↗2017 ✓ verified in Essentials
- Training language models to follow instructions with human feedback ↗2022 ✓ verified in Essentials
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model ↗2023 ✓ verified in Essentials
- Constitutional AI: Harmlessness from AI Feedback ↗2022 ✓ verified in Essentials
04Courses & videos
- Illustrating RLHF ↗ExplainersEN
- Nathan Lambert:RLHF Book ↗BooksEN
- TRL:DPO Trainer ↗Official docsEN
- Lilian Weng:Reward Hacking in Reinforcement Learning ↗ExplainersEN
05Hands-on: project, code & exercises
Free, official or author-published pages. Most run in the browser or on a free Colab GPU.
PROJECT
Run DPO with TRL on a public preference dataset for a ~1B model and compare helpfulness and safety before and after.
- 1TRL:DPO Trainer ↗Official docs
Train a small model with DPO on a preference dataset and compare answers before and after.
- 2
06Self-test
Answer in your head, then open to check.
What does the KL penalty do in RLHF?
It stops the policy drifting too far from the reference model and gaming the reward.
Which two things does DPO remove?
A separate reward model and online RL sampling.
In Constitutional AI, what does “AI feedback” replace?
Human preference labels on harmfulness.
On these routes: Algorithm Researchers