DPO
×Stage · Llama 3.1 405B
Direct preference optimization on the latest preference data, with the formatting tokens masked out of the loss and a negative log-likelihood term on the chosen responses.
- Objective
- DPO, formatting tokens masked, NLL 0.2 on chosen
- Learning rate and β
- 10⁻⁵; β = 0.1
- Rounds
- six, each an SFT followed by DPO
Not disclosed Tokens
Why
PPO was explored; DPO required less compute for large models and performed better, especially on instruction following. Llama 3 paper §4.1.4, p. 16
Masking the formatting tokens stabilizes training. The paper hypothesizes that, since they are in both chosen and rejected responses, the contrastive loss would push their likelihood up and down at once. The NLL term keeps the chosen responses’ log probability from falling. Llama 3 paper §4.1.4, p. 16
The training step →What one step of this stage computes, as a plate.
Architecture at this stageThe SFT model, aligned to preferences.
All settings8
- Rounds
- Six rounds, each an SFT followed by DPO. Each round’s data are generated with the best models of the previous round: “Best model for next round” (Figure 7), “sampling synthetic data from the latest models”. The paper says SFT fine-tunes pre-trained checkpoints; that a round starts from the previous round’s model is not stated.
- Objective
- DPO, with the formatting tokens masked out of the loss in chosen and rejected responses, and an NLL term with coefficient 0.2 on the chosen sequences
- Learning rate and β
- 10⁻⁵; β = 0.1
- Data
- Mostly the latest batches of preference data, collected with the best models of the previous rounds; only samples labelled significantly better or better
- Context
- Short-context data only, on top of the long-context SFT checkpoints
- Steps
- Fewer optimizer steps than SFT
- Model averaging
- Models from experiments with various data or hyperparameters are averaged at each RM, SFT and DPO stage
- Against PPO
- PPO was explored; DPO “required less compute for large-scale models and performed better”
Sources4
- Llama3-Herd-2407.21783v3.pdf, p. 15Rounds
- Llama3-Herd-2407.21783v3.pdf, p. 17Rounds, Data
- Llama3-Herd-2407.21783v3.pdf, p. 16Objective, Learning rate and β, Data, Model averaging, Against PPO
- Llama3-Herd-2407.21783v3.pdf, p. 24Context, Steps