What it is
Every DPO run has a reference model: a frozen copy of the model as it was before preference training. Beta (β) decides how far the run may move away from it. Think of a leash: the pairs pull the model toward the answers you prefer, and β sets how short the leash is.
Why have a leash at all? Your pairs cover a narrow slice of what the model will be asked. Left unconstrained, the cheapest way to separate preferred from non-preferred answers can be extreme: make some phrasing nearly impossible, lengthen everything, or drift in ways nobody reviewed. Staying near the reference keeps the rest of the model's behaviour (its general knowledge, its fluency, what the supervised step taught it) largely intact.
How it works
In the objective DPO is derived from, β multiplies the penalty for diverging from the reference, measured as KL divergence. The best model under that objective is the reference re-weighted by e raised to reward ÷ β. With a large β, even big reward differences change the probabilities only a little; with a small β, small differences are amplified.
objective: maximise reward − β × KL(model ‖ reference)
best model: π*(answer) ∝ π_ref(answer) × e^(reward(answer) / β)
large β → rewards barely move the probabilities
small β → small reward differences are amplifiedInside the loss, β multiplies the log-ratio margin before the sigmoid. A pair stops pulling once β × margin is comfortably positive, because the loss for that pair flattens out. A higher β reaches that point after less movement away from the reference; a lower β keeps pulling until the model has moved much further.
- Take a pair where training has moved the log-ratio margin (chosen minus rejected, each against the reference) to 4.0.
- β = 0.05: β × margin = 0.2 and the loss is 0.60. Still close to the 0.69 starting value, so this pair keeps pulling hard.
- β = 0.1: 0.4, loss 0.51. Partway there.
- β = 0.5: 2.0, loss 0.13. Mostly satisfied; this pair now contributes little further change.
- To push this pair's loss down to 0.1, the margin must reach about 22.5 at β = 0.1 but only about 4.5 at β = 0.5. A lower β lets the same pairs move the model much further.
This is also why the loss value depends on β. A loss of 0.3 at β = 0.5 and a loss of 0.3 at β = 0.05 describe very different amounts of change. Compare loss curves only between runs that used the same β.
How to choose
| β | Effect | When to use it |
|---|---|---|
| 0.05 | Preferences change the model more. Faster effect, higher risk of odd behaviour. | Clean, plentiful pairs, and a model that barely moved at 0.1. |
| 0.1 | The usual balance. | A first run. The default in the DPO paper's experiments and in Hugging Face TRL. |
| 0.3–0.5 | Stays closer to the original. Safer, smaller effect. | Few or noisy pairs; a loss that fell to near 0 very fast; answers that drifted or started inventing details. |
The DPO paper used β = 0.1 for most experiments and β = 0.5 for its summarisation task. Hosted platforms may accept a wider range (one documents 0 to 2) or pick a value automatically.
The strength of the pull back toward the starting model during preference tuning. Lower lets the pairs change the model more; higher keeps it closer to the original. Change it in small steps and compare evaluations, not losses, because β changes the loss scale.
β works together with the other settings. The learning rate and the number of epochs decide how hard and how long the model is pushed; β decides how much movement counts as enough. If a run went too far, raise β or lower the learning rate, but not both at once, or you will not know which one helped.
Common mistakes
- Lowering β to make DPO “work harder” on few or noisy pairs. It amplifies whatever the pairs reward, mistakes included.
- Comparing loss values between runs that used different β.
- Changing β, learning rate and epochs at the same time, so you cannot tell which change mattered.
- Assuming a very high β is always safe. At extreme values the run changes almost nothing, and you pay for training that has no effect.
References and further reading
External sources open in a new tab.
- 01Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafailov et al., 2023 · arXiv · arxiv.orgSection 4 derives the closed-form optimum; the appendix lists β = 0.1 by default and 0.5 for summarisation.
- 02DPO TrainerHugging Face TRL docs · huggingface.coβ defaults to 0.1; the docs describe a higher β as less deviation from the reference.
- 03Direct preference optimizationOpenAI API docs · developers.openai.comA hosted provider's description of beta: higher is more conservative, lower favours the new preferences.
- 04A General Theoretical Paradigm to Understand Learning from Human PreferencesAzar et al., 2023 · arXiv · arxiv.orgShows that when preferences are near-deterministic, the pull toward the reference weakens and DPO can overfit.