Annealing
×Stage · Llama 3.1 405B
The learning rate goes linearly to zero over the last 40M tokens, on upsampled data of very high quality; the checkpoints are averaged.
- Tokens
- the final 40M
- Learning rate
- linearly to 0
- Averaging
- Polyak averaging of checkpoints during annealing gives the final pre-trained model
Derived
Objective. The paper describes this stage as continued pre-training and names no other objective: next-token prediction is concluded from that, and the paper does not state it for the stage.
Trained. The paper names no part of the model held fixed in pre-training: that every parameter trains is concluded, and the paper does not state it.
Why
Annealing on small amounts of high-quality code and mathematics data can boost key benchmarks: with the GSM8k and MATH training sets in the annealing mix, a pre-trained 8B model rose by 24.0% and 6.4% on their validation sets, while for the 405B the gain was negligible. The final annealing data excludes benchmark training sets. Llama 3 paper §3.1.3, p. 6
Architecture at this stageThe same model; its checkpoints over the stage are averaged into the pre-trained model.
All settings8
- Tokens
- The final 40M, as printed
- Optimizer steps
- About 2 to 3derived40M tokens over Table 4’s 16M tokens per batch is 2.5; the paper does not count the steps.
- Learning rate
- Linearly annealed to 0
- Context
- 128K
- Data
- Sources of very high quality upsampled; no training sets of common benchmarks
- Averaging
- Polyak averaging of checkpoints during annealing gives the final pre-trained model
- Objective
- Next-token predictionderivedThe paper describes this stage as continued pre-training and names no other objective: next-token prediction is concluded from that, and the paper does not state it for the stage.
- Trainable
- AllderivedThe paper names no part of the model held fixed in pre-training: that every parameter trains is concluded, and the paper does not state it.
Sources5
- Llama3-Herd-2407.21783v3.pdf, p. 15Tokens, Optimizer steps, Learning rate, Context, Data, Averaging, Objective, Trainable
- Llama3-Herd-2407.21783v3.pdf, p. 10Optimizer steps
- Llama3-Herd-2407.21783v3.pdf, p. 6Data
- Llama3-Herd-2407.21783v3.pdf, p. 3Objective
- Llama3-Herd-2407.21783v3.pdf, p. 1Trainable