The Practitioner's LLM Curriculum ← Week 4 · Preference Loss Explorer
Interactive · Week 4 · Section 3

Why DPO works without a reward model.

DPO's loss is a one-line function of the margin between chosen and rejected log-probabilities. The β parameter controls how steeply the loss falls as the margin grows — and how aggressively the gradient saturates. Drag β to see the curve change shape, run training steps, and watch how four preference pairs converge at different rates because of where they started on the curve.

β (beta) 0.30
Mean margin
how aligned the policy is
Total DPO loss
across all 4 pairs

DPO loss curve

−log σ(β · margin) · current dots show each preference pair

Preference pairs

step 0

What's happening here