Mid-training 200K
×Stage · GLM-5
The context goes to 200K on 50B tokens, with a small share of multi-turn recall data.
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 the shared MTP layers train in mid-training 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
- 50B
- Context
- 200K
- Base model in all
- 28.55Tderived
Not disclosed Batch · Steps
Why
A 200K stage after the 128K one improved the model even within a 128K window, and more diverse long-context data kept improving it. GLM-5 report §2.3, p. 9
Architecture at this stageThe model as drawn but with dense MLA attention, no indexer.
What the terms meanMTP, multi-token prediction
- 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 settings7
- Tokens
- 50B
- Context
- 200K
- Data
- As at 128K, with a small proportion of MRCR-like data, variants of multi-turn recall in long dialogues
- Base model in all
- 27T + 1T + 500B + 50B = 28.55TderivedThe pre-training corpora and the three mid-training stages add up to the report’s “totaling 28.5 trillion tokens for the base model”.
- Learning rate
- Down linearly from 4×10⁻⁵ to 1×10⁻⁵ over mid-training
- Objective
- Next-token prediction
- Trainable
- Every parameter
Sources5
- GLM5-2602.15763v2.pdf, p. 8Tokens, Context, Base model in all, Objective, Trainable
- GLM5-2602.15763v2.pdf, p. 9Data
- GLM5-2602.15763v2.pdf, p. 3Base model in all
- GLM5-2602.15763v2.pdf, p. 4Base model in all
- GLM5-2602.15763v2.pdf, p. 36Learning rate