GLM-5.2
Z.ai · GLM-5 · open weights
- MLA
- Sparse attention
- RoPE
- Partial RoPE
- Pre-norm
- MoE
- Shared expert
- Dense first layers
- MTP
Facts and where they come from
| Released | 2026-06 | config.jsonconfig.jsonHugging Face repository creation date (api.createdAt) |
|---|---|---|
| Licence | mit | config.jsonconfig.jsonREADME metadata: license |
| Total parameters | not disclosed | not disclosed |
| Active parameters | not disclosed | not disclosed |
| Context length | 1M tokens | config.jsonconfig.jsonmax_position_embeddings |
| Norm placement | pre | codemodelling codetransformers 5.18.0 / repo modelling code for glm_moe_dsa: input_layernorm before attention, post_attention_layernorm before the MLP |
| Norm type | RMSNorm | codemodelling codetransformers 5.18.0 / repo modelling code for glm_moe_dsa: input_layernorm before attention, post_attention_layernorm before the MLP |
| QK-norm | no | codemodelling codeno q/k normalisation in the attention block (MLA normalises its latent vectors, which is not QK-norm) |
| Positional encoding | RoPE on 25% of each head | config.jsonconfig.jsonqk_rope_head_dim / (qk_nope_head_dim + qk_rope_head_dim): decoupled RoPE |
| Parallel attention and MLP | no | codemodelling codetransformers 5.18.0 / repo modelling code for glm_moe_dsa: input_layernorm before attention, post_attention_layernorm before the MLP |
Architecture, drawn from the data
MLA 64h, latent 512, top-2048. Each column is one layer: its token mixer above, its feed-forward block below. Paler columns reuse another layer’s keys and values.
Modelled costs
From the cost model, batch size 1. Totals the lab states are in the table above; differences come from rounding, from what a lab counts, or from parts the model does not describe (listed on the about page).
| Parameters (modelled) | 744B |
|---|---|
| Active per token (modelled) | 41.8B |
| Without embeddings and output head | 742B total, 39.9B active |
| Multi-token-prediction layers (extra) | 9.95B |
| Published weights (Hugging Face count) | 753B |
| KV cache per token, BF16 (layers that grow with context) | 93 KiB |
| KV cache + state at 1M tokens, BF16 | 93 GiB |
| Decode FLOPs per token at 4K context | 94.8 GFLOP |
| Prefill FLOPs for a 4K prompt | 364 TFLOP |
KV cache against context
Every architecture field
| Field | Value | Source |
|---|---|---|
| d_model | 6,144 | config.jsonconfig.jsonhidden_size |
| vocab | 154,880 | config.jsonconfig.jsonvocab_size |
| tied_embeddings | false | config.jsonconfig.jsontie_word_embeddings |
| mixers.mla.type | mla | codemodelling codemulti-head latent attention |
| mixers.mla.heads | 64 | config.jsonconfig.jsonnum_attention_heads |
| mixers.mla.q_lora_rank | 2,048 | config.jsonconfig.jsonq_lora_rank |
| mixers.mla.kv_lora_rank | 512 | config.jsonconfig.jsonkv_lora_rank |
| mixers.mla.qk_nope | 192 | config.jsonconfig.jsonqk_nope_head_dim |
| mixers.mla.qk_rope | 64 | config.jsonconfig.jsonqk_rope_head_dim |
| mixers.mla.v_head_dim | 256 | config.jsonconfig.jsonv_head_dim |
| mixers.mla.indexer.heads | 32 | config.jsonconfig.jsonindex_n_heads |
| mixers.mla.indexer.head_dim | 128 | config.jsonconfig.jsonindex_head_dim |
| mixers.mla.indexer.topk | 2,048 | config.jsonconfig.jsonindex_topk |
| ffns.dense.type | dense | codemodelling codeMLP block |
| ffns.dense.d_ff | 12,288 | config.jsonconfig.jsonintermediate_size |
| ffns.dense.gated | true | codemodelling codeMLP: gated (SwiGLU/GeGLU) |
| ffns.moe.type | moe | codemodelling codeMoE block |
| ffns.moe.experts | 256 | config.jsonconfig.jsonn_routed_experts |
| ffns.moe.active | 8 | config.jsonconfig.jsonnum_experts_per_tok |
| ffns.moe.d_expert | 2,048 | config.jsonconfig.jsonmoe_intermediate_size |
| ffns.moe.gated | true | codemodelling codeexperts are gated MLPs |
| ffns.moe.shared | 1 | config.jsonconfig.jsonn_shared_experts |
| ffns.moe.d_shared | 2,048 | config.jsonconfig.jsonmoe_intermediate_size |
| layout | 3× mla/dense (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) · 1× mla/moe (indexer=true) · 3× mla/moe (indexer=false) | config.jsonconfig.jsonnum_hidden_layers, first_k_dense_replace, indexer_types |
| mtp_layers | 1 | config.jsonconfig.jsonnum_nextn_predict_layers |
Sources
- config.json @ cf457fa
- model card
- arXiv 2602.15763
- modelling code · transformers 5.18.0 modelling code, or the model repository's own modelling file at the pinned revision
Listed in the LLM Architecture Gallery checklist as “GLM-5.2 (744B)” (name only; see about).