Context 128K
×Stage · DeepSeek-V3
The second YaRN phase extends the context to 128K in 1,000 steps.
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.
Next-token prediction continues from pre-training; whether multi-token prediction, fill-in-the-middle and the balance loss do too, the report 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
- ≈ 62.9Bderived
- Steps, sequence, batch
- 1,000 steps; 128K tokens; batch 480
- Learning rate
- 7.3×10⁻⁶
Architecture at this stageNo lightning indexer: dense attention.
What the terms meanYaRN · MTP, multi-token prediction
- YaRN
- A way to lengthen the context of rotary position embeddings: the slow-turning frequencies are divided by a factor s, the fast ones kept and those between blended, and attention scores are rescaled slightly, so that positions past the trained length look like positions the model has seen.
- MTP, multi-token prediction
- Extra modules predict tokens further ahead than the next one, and their cross-entropy, times a weight λ, is added to the loss.
All settings3
- Steps, sequence, batch
- 1,000 steps; 128K tokens; batch 480
- Learning rate
- 7.3×10⁻⁶
- Tokens
- 1,000 × 480 × 131,072 ≈ 62.9BderivedSteps × sequences × sequence length.
Sources1
- DeepSeek-V3 report, p. 23Steps, sequence, batch, Learning rate, Tokens