Llama 3 post-training
×Stage · Llama 3 (April 2024)
Llama 3’s post-training combined supervised fine-tuning, rejection sampling, PPO and DPO.
Supervised fine-tuning
In words
The model is trained on examples of the answers wanted, prompts with their responses, by the cross-entropy of next-token prediction on the responses.
: the prompt; : the response; the prompt’s tokens are left out of the loss.
- Reinforcement learning. The model writes responses, a reward scores them, and the model is moved toward the responses that score higher.
- DPO. From pairs of a preferred and a rejected response, the model is trained to raise the preferred one’s probability, measured against a frozen reference model, more than the rejected one’s, with no separate reward model.
Supervised fine-tuning as drawn for Llama 3.1 →That plate also draws Llama 3’s rejection sampling.
- Data
- over 10M human-annotated examples
Not disclosed Rounds · Settings
Architecture at this stageLlama 3, tuned.
What the terms meanRejection sampling · PPO
- Rejection sampling
- The model writes several responses to a prompt, a reward model or another check keeps the best, and the kept responses become training data. Llama 3 paper §4.2.2, p. 18
- PPO
- Proximal policy optimization: reinforcement learning whose baseline for a response is a learned value model, with each update clipped near the policy that wrote the samples. GRPO keeps the clip and takes the group’s mean reward as the baseline.
All settings2
- Method
- “A combination of supervised fine-tuning (SFT), rejection sampling, proximal policy optimization (PPO), and direct preference optimization (DPO)”
- Data
- Publicly available instruction datasets and over 10M human-annotated examples