Context 32K
×Stage · DeepSeek-V3
YaRN extends the context from 4K to 32K 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; 32K tokens; batch 1,920
- Learning rate
- 7.3×10⁻⁶
- Compute
- 119K H800 GPU hours with the 128K phase
Architecture at this stage →The model before sparse attention: no lightning indexer, dense attention.
YaRN rescales the rotary key from here on (scale 40).
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. DeepSeek-V3 report §4.3, p. 23
- 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 settings5
- Method
- YaRN on the decoupled shared key only: s = 40, α = 1, β = 32, scaling factor √t = 0.1 ln s + 1
- Steps, sequence, batch
- 1,000 steps; 32K tokens; batch 1,920
- Learning rate
- 7.3×10⁻⁶, the pre-training’s final rate
- Tokens
- 1,000 × 1,920 × 32,768 ≈ 62.9BderivedSteps × sequences × sequence length.
- Compute
- 119K H800 GPU hours with the 128K phase
Sources3
- DeepSeek-V3 report, p. 23Method, Steps, sequence, batch, Learning rate, Tokens
- inference/model.py, lines 535–537Method
- DeepSeek-V3 report, p. 5Compute