Post-training
×Supervised fine-tuning, rejection sampling, PPO and DPO, on public instruction data and over 10 million human-annotated examples.
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. Proximal policy optimization (PPO), as Meta’s post names it.
- 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
- Safety
- Red-teamed with human experts and automated adversarial prompts; the findings inform safety fine-tuning
Not disclosed Rounds of post-training · Learning rate · Steps · Trainable
Why
Preference rankings, through PPO and DPO, greatly improved reasoning and coding: a model that sometimes produces the right reasoning trace knows how to answer but not how to select the answer, and the rankings teach it to select. Meta’s post on Llama 3
Architecture at this stageThe pre-trained model, tuned for dialogue.
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.
- 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 settings3
- Method
- A combination of supervised fine-tuning, rejection sampling, proximal policy optimization (PPO) and direct preference optimization (DPO)
- Data
- Publicly available instruction datasets and over 10M human-annotated examples; no Meta user data. The prompts for SFT and the preference rankings for PPO and DPO were carefully curated, with multiple rounds of quality assurance on the human annotations
- Safety
- Red-teamed with human experts and automated adversarial prompts; the findings inform safety fine-tuning
Sources3
- Meta’s Llama 3 postMethod, Data, Safety
- Llama 3 model card, line 13Method
- Llama 3 model card, line 139Data