Training

Pinned sources DeepSeek‑V3 report (arXiv 2412.19437v2), DeepSeek‑V3.2‑Exp report @ 87e509a, model cards of V3.1, V3.1‑Terminus and V3.2‑Exp

  1. Random initialisation
  2. Pre‑trainingDeepSeek-V314.8T4KNTPFIMrate 0.1MTPλ 0.3, then 0.1Balanceα 0.0001What trains: allMTP module
  3. Context 32KDeepSeek-V3≈ 62.9B32KNTPWhat trains: allYaRN, s = 40
  4. Context 128KDeepSeek-V3≈ 62.9B128KNTPWhat trains: all
  5. DeepSeek-V3-Base
  6. From V3’s base: before or after its context extension, not stated
  7. Context 32KDeepSeek-V3.1630B32KNTPWhat trains: all
  8. Context 128KDeepSeek-V3.1209B128KNTPWhat trains: all
  9. DeepSeek-V3.1-Base
  10. V3.1-Base or a later checkpoint: not stated
  11. V3.1-Terminus base checkpoint
  12. Dense warm‑up2.1B128KKLto main attentionWhat trains: indexer+ indexer
  13. Sparse training943.7B128KLMKLselected positionsWhat trains: allsparse, top 2,048
  14. DeepSeek-V3.2 base
  15. Specialist distillationnot statednot statedDistillationfrom specialistsnot statednot stated: tokens, context, what trains
  16. Mixed RLnot statednot statedGRPOone stagenot statednot stated: tokens, context, what trains
  17. DeepSeek-V3.2-Exp
  • tokens, log scale
  • derived: computed from stated numbers
  • NTPdashed: concluded, no source names it
  • not stated by the sources
  • the architecture changes
  • checkpoint
  • checkpoint, weights published
  • a join the sources leave unexplained

Context 32K

×

Stage · DeepSeek-V3

YaRN extends the context from 4K to 32K in 1,000 steps.

Next-token prediction

L=−1T∑i=2T+1log⁡Pi[ti]\mathcal L=-\frac1T\sum_{i=2}^{T+1}\log P_i[t_i]
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.

tit_i: the token at position ii; Pi[ti]P_i[t_i]: the probability the model, reading the tokens before it, gave that token; TT: 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.

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

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