Code expert
×A branch of the pre-training run continues pre-training on 1T tokens of mostly code, extends its context to 16K and is post-trained; it is used to collect code annotations and to rejection-sample code.
Next-token prediction
In words
At every position the model gives each token of the vocabulary a probability of coming next; the loss is the negative logarithm of the probability it gave the token that does come next, averaged over the sequence.
: the token at position ; : the probability the model, reading the tokens before it, gave that token; : the sequence length.
The paper continues pre-training on code with “a recipe similar to that of CodeLlama”, whose base models also train infilling; whether this stage does, it does not say.
Next-token prediction as drawn for DeepSeek‑V3.2‑Exp →That plate also draws multi-token prediction, fill-in-the-middle and DeepSeek-V3’s sequence-wise balance loss.
- Tokens
- 1T
- Data
- >85% code
- Context
- 16K at the end
- Use
- Collecting high-quality human annotations for code throughout later rounds of post-training
Not disclosed Learning rate
Architecture at this stageA copy of the model, branched from its pre-training run.
What the terms meanRejection sampling
- 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
All settings5
- Tokens
- 1T
- Data
- Mostly (>85%) code
- Context
- Long-context fine-tuning to 16K tokens over the last several thousand steps, on repo-level code
- Post-training
- The recipes of §4.1, with SFT and DPO mixes primarily for code
- Use
- Collecting high-quality human annotations for code throughout later rounds of post-training
Sources1
- Llama 3 paper, p. 19Tokens, Data, Context, Post-training, Use