Pre-training
×Training from scratch on 8.1T tokens at 4K context, with three balance losses and device-limited routing.
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.
- Balance loss. Three auxiliary losses, for expert-level, device-level and communication balance, with , , .
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.
- Data
- 8.1T tokens
- Context
- 4K
- Learning rate
- 2.4×10⁻⁴, ×0.316 twice
- Batch
- 2,304 → 9,216
- Compute
- ≈ 1.4M H800 GPU hoursderived
Not disclosed Data mixture proportions
Architecture at this stageThe model as drawn without YaRN, at a 4K context.
All settings9
- Data
- 8.1T tokens; the DeepSeek 67B pipeline with more data and better filtering; more Chinese, about 12% more Chinese tokens than English
- Objective
- Next-token predictionderivedThe paper does not name the pre-training objective; the loss of the code shipped with the checkpoint is the next-token cross-entropy.
- Load balancing
- Expert-, device- and communication-level balance losses, α₁ = 0.003, α₂ = 0.05, α₃ = 0.02; device-limited routing to at most 3 of 8 devices; device-level token dropping in training, none in evaluation
- Optimiser
- AdamW, β₁ = 0.9, β₂ = 0.95, weight decay 0.1; gradient clipping at 1.0
- Learning rate
- 0 → 2.4×10⁻⁴ over the first 2K steps; multiplied by 0.316 after about 60% of the tokens and again after about 90%
- Context
- 4K
- Batch
- 2,304 → 9,216 over the first 225B tokens, then 9,216; the paper gives no unit
- Compute
- ≈ 1.4M H800 GPU hoursderived172.8K GPU hours per trillion tokens, the paper’s rate, times 8.1T tokens.
- Trainable
- All parameters, randomly initialised
Sources5
- DeepSeek-V2-2405.04434v5.pdf, pp. 11–12Data
- modeling_deepseek.py, lines 1675–1686Objective
- DeepSeek-V2-2405.04434v5.pdf, pp. 10–12Load balancing
- DeepSeek-V2-2405.04434v5.pdf, p. 12Optimiser, Learning rate, Context, Batch, Trainable
- DeepSeek-V2-2405.04434v5.pdf, p. 16Compute