How GLM-5 was made, stage by stage: 27T tokens of pre-training, mid-training to 200K, the move to sparse attention, SFT, three RL stages and on-policy distillation.
Training
Pinned sources GLM‑5 report (arXiv 2602.15763v2) · no training code is published
- Start of training
- Pre‑training, generalweb data18T4KNTPMTPWhat trains: all3 shared MTP layers
- Pre‑training, code and reasoningcode, mathematics, science9T4KNTPMTPWhat trains: all
- Mid‑training 32Klong code and reasoning1T32KNTPWhat trains: all
- Mid‑training 128Klong context and agent data500B128KNTPWhat trains: all
- Mid‑training 200Kthe longest documents50B200KNTPWhat trains: all
- Base model, dense attention
- DSA warm‑up1,000 steps≈ 2.8B202,752KLto main attentionWhat trains: indexer+ indexer
- Sparse adaptationmid-training’s data20B200KLMKLselected positionsWhat trains: allsparse
- GLM-5 base model
- SFTchat, reasoning, agentsnot stated202,752SFTnot statednot stated: tokens, what trains
- Reasoning RLfour domainsnot statednot statedGRPO+ IcePopWhat trains: not indexernot stated: tokens, context
- Agentic RLasynchronousnot statednot statedGRPOWhat trains: not indexernot stated: tokens, context
- General RLhuman-style alignmentnot statednot statedGRPOWhat trains: not indexernot stated: tokens, context
- On‑policy distillationacross stagesnot statednot statedOPDnot statednot stated: tokens, context, what trains
- GLM-5
- 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