Rejection sampling and SFT

Reports The Llama 3 Herd of Models (arXiv 2407.21783v3) · DPO (arXiv 2305.18290v3) · no training code is published · How to read

Rejection sampling and SFT

Kept response

×

tensor

The response yy the fine-tuning trains on, with its prompt xx: the pair the model reads.

shape
yy [B batch, T positions]
Sources

Contextual evidence from Keep the best

§4.2.2, Rejection sampling: for each prompt collected during human annotation, K outputs (typically between 10 and 30) are sampled from the latest chat model policy, usually the best checkpoint of the previous post-training iteration or the best for a capability; the reward model selects the best candidate. In later rounds system prompts steer the responses’ tone, style or formatting.

rs · arXiv 2407.21783 / Llama3-Herd-2407.21783v3.pdf
Pinned revision v3 ↗ · p. 18

Contextual evidence from Model

§4.1.3: the reward model performs rejection sampling on human annotation prompts; with this data and other sources, including synthetic data, the pre-trained language model is fine-tuned with a standard cross-entropy loss on the target tokens, the loss masked on prompt tokens; learning rate 10⁻⁵ over 8.5K to 9K steps for the largest models.

sft · arXiv 2407.21783 / Llama3-Herd-2407.21783v3.pdf
Pinned revision v3 ↗ · p. 16