Training

Pinned sources GLM‑5.1 model card (zai‑org/GLM‑5.1 @ 26e1bd6) · for GLM‑5, its report (arXiv 2602.15763v2) · no training code is published

  1. GLM-5, February 2026, earlier release 12 stages
  2. Start of training
  3. Pre‑training, generalweb data18T4KNTPMTPWhat trains: all3 shared MTP layers
  4. Pre‑training, code and reasoningcode, mathematics, science9T4KNTPMTPWhat trains: all
  5. Mid‑training 32Klong code and reasoning1T32KNTPWhat trains: all
  6. Mid‑training 128Klong context and agent data500B128KNTPWhat trains: all
  7. Mid‑training 200Kthe longest documents50B200KNTPWhat trains: all
  8. Base model, dense attention
  9. DSA warm‑up1,000 steps≈ 2.8B202,752KLto main attentionWhat trains: indexer+ indexer
  10. Sparse adaptationmid-training’s data20B200KLMKLselected positionsWhat trains: allsparse
  11. GLM-5 base model
  12. SFTchat, reasoning, agentsnot stated202,752SFTnot statednot stated: tokens, what trains
  13. Reasoning RLfour domainsnot statednot statedGRPO+ IcePopWhat trains: not indexernot stated: tokens, context
  14. Agentic RLasynchronousnot statednot statedGRPOWhat trains: not indexernot stated: tokens, context
  15. General RLhuman-style alignmentnot statednot statedGRPOWhat trains: not indexernot stated: tokens, context
  16. On‑policy distillationacross stagesnot statednot statedOPDnot statednot stated: tokens, context, what trains
  17. GLM-5
  18. Whether GLM-5.1 continues GLM-5: not stated
  19. GLM-5.1’s start
  20. Training, not describednot statednot statednot statednot statednot stated: tokens, context, objective, what trains
  21. GLM-5.1
  • 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

DSA warm-up

×

Stage · GLM-5

The move to DeepSeek Sparse Attention begins with a short dense warm-up, from the base model at the end of mid-training.

KL to a target distribution

One part of the model learns to imitate a distribution another part produces: the loss is the KL divergence of that target from the learner’s distribution.

LI=∑tDKL(pt,: ∥ Softmax⁡(It,:))\mathcal L_I=\sum_t D_{\mathrm{KL}}\big(p_{t,:}\,\big\|\,\operatorname{Softmax}(I_{t,:})\big)

DeepSeek-V3.2-Exp report, eq. 3

What the letters mean

pt,:p_{t,:}: what the main attention attends to from query tt, the target; It,:I_{t,:}: the lightning indexer’s scores for it.

The report follows DeepSeek-V3.2-Exp’s two stages. In DeepSeek’s recipe the warm-up trains only the indexer, by KL to the main attention, and the sparse stage trains every parameter; the report’s own small run on GLM-4.7-Flash (p. 7) trains only the indexer in the warm-up and the whole model after it, and names no loss.

Steps and sequences
1,000 steps of 14 sequences of 202,752 tokens
Tokens
≈ 2.84Bderived
Learning rate
5×10⁻³ down to 2×10⁻⁴

Not disclosed Objective · Trainable

What the terms meanSparse attention
Sparse attention
Each query attends only to a subset of the earlier positions, picked by an indexer, which keeps attention over a long context affordable.
All settings4
Method
DeepSeek Sparse Attention brought in by continued training from the dense base model, in DeepSeek-V3.2-Exp’s two stages, “dense warm-up and sparse training adaptation”
Steps and sequences
1,000 steps, each of 14 sequences of 202,752 tokens
Tokens
1,000 × 14 × 202,752 ≈ 2.84BderivedSteps × sequences × sequence length.
Learning rate
From a maximum of 5×10⁻³ down to 2×10⁻⁴
Sources3