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

Pre-training

×

Stage · DeepSeek-V3

Next-token prediction on 14.8T tokens at 4K context, with multi-token prediction and auxiliary-loss-free load balancing.

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.

  • Fill-in-the-middle. A tenth of the documents are rearranged so that next-token prediction learns to write a middle from both sides.
  • Multi-token prediction. One module (D=1D=1); λ\lambda is 0.3 for the first 10T tokens, then 0.1.
  • Balance loss. Only a complement here, with α=0.0001\alpha=0.0001: the load is balanced mainly with no loss, auxiliary-loss-free.
Tokens
14.8T
Context
4K
Learning rate
2.2×10⁻⁴, down to 7.3×10⁻⁶
Batch
3,072 → 15,360 sequences
Compute
2,664K H800 GPU hours

Not disclosed Data mixture proportions

A multi-token prediction module of depth 1 trains alongside the model in pre-training; no source says whether later stages keep it. The report says inference can discard it or reuse it for speculative decoding (p. 11); the pinned inference code builds none (model.py 881–886).

What the terms meanMTP, multi-token prediction · Auxiliary-loss-free balancing
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.
Auxiliary-loss-free balancing
Load balancing of the MoE experts with no loss: each expert has a bias on its routing score, used only to choose experts, moved after each step so that over-used experts are chosen less and under-used ones more. DeepSeek-V3 report §2.1.2, p. 9
All settings11
Data
14.8T tokens; more mathematics and code than DeepSeek-V2; multilingual beyond English and Chinese; documents packed without cross-sample masking
Objective
Next-token prediction; Fill-in-Middle (prefix–suffix–middle) at rate 0.1; multi-token prediction of depth 1, weight 0.3 for the first 10T tokens, then 0.1
Load balancing
Auxiliary-loss-free bias, update speed 0.001 for the first 14.3T tokens, then 0; sequence-wise balance loss α = 0.0001
Optimiser
AdamW, β₁ = 0.9, β₂ = 0.95, weight decay 0.1; gradient clipping at 1.0
Learning rate
0 → 2.2×10⁻⁴ over the first 2K steps; constant until 10T tokens; cosine down to 2.2×10⁻⁵ over 4.3T; 2.2×10⁻⁵ for 333B; 7.3×10⁻⁶ for the last 167B
Context
4K
Batch
3,072 → 15,360 sequences over the first 469B tokens, then 15,360
Tokens
10T + 4.3T + 0.5T = 14.8TderivedThe learning-rate phases add up to the reported total.
Compute
2,664K H800 GPU hours
Number format
FP8 mixed-precision training
Trainable
All parameters, randomly initialised
Sources6