GLM · 2025-07 · Sparse MoE
GLM-4.5
GLM-4.5 is a grouped-query attention (GQA) transformer released by GLM in 2025-07, with 92 layers, hidden size 5120 and a context window of 131,072 tokens.
Layer stack
Attention ×92 · Layers 92
Key facts
| Family | GLM |
|---|---|
| Released | 2025-07 |
| Params | 360.4 B |
| Active | 32.7 B |
| Context | 131,072 tokens |
| Attention | GQA (96:8) |
| Layers | 92 |
| Hidden | 5,120 |
| Heads | 96 |
| Vocab | 151,552 |
| Position | RoPE |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | bf16 |
| Architecture class | Glm4MoeForCausalLM |
Architecture overview
Attention
grouped-query attention (GQA) — 96 q-heads / 8 kv-heads. RoPE θ=1,000,000.
Feed-forward / MoE
It is a sparse mixture-of-experts with 160 routed experts and top-8 routing; about 32.7B parameters are active per token.
The configuration ships 1 extra multi-token-prediction (MTP) layers used to accelerate decoding.
Field-level comparison
Compared against the previous model of the same lab; where none exists, against the structurally closest model. The ratio column is this model divided by the comparison model.
Full-field comparison vs predecessor GLM-4 9B
| Model | GLM-4.5 | GLM-4 9B | Ratio |
|---|---|---|---|
| model_type | glm4_moe | chatglm | ≠ |
| architectures | Glm4MoeForCausalLM | ChatGLMModel | ≠ |
| hidden_size | 5120 | 4096 | ×1.25 |
| num_hidden_layers | 92 | — | |
| num_attention_heads | 96 | 32 | ×3.00 |
| num_key_value_heads | 8 | — | |
| head_dim | 128 | — | |
| intermediate_size | 12288 | — | |
| hidden_act | silu | — | |
| n_routed_experts | 160 | — | |
| num_experts_per_tok | 8 | — | |
| n_shared_experts | 1 | — | |
| moe_intermediate_size | 1536 | — | |
| rope_theta | 1000000 | — | |
| max_position_embeddings | 131072 | — | |
| rms_norm_eps | 0.00001 | — | |
| vocab_size | 151552 | — | |
| torch_dtype | bfloat16 | bfloat16 | = |
| num_nextn_predict_layers | 1 | — | |
| attention_bias | true | — | |
| attention_dropout | 0 | 0 | = |
| pad_token_id | 151329 | 151329 | ≈1 |
| eos_token_id | 151329×1 + 151336×1 + 151338×1 | 151329×1 + 151336×1 + 151338×1 | = |
| partial_rotary_factor | 0.5 | — | |
| initializer_range | 0.02 | — | |
| norm_topk_prob | true | — |
Most similar architectures
- GLM-4.6 (GLM, 2025-10) 1.000
- Qwen3 235B A22B (Qwen, 2025-04) 0.999
- Qwen3.8 2.4T A95B (Qwen, 2026-08) 0.994
- GLM-4.5-Air (GLM, 2025-07) 0.989
- MiniMax-Text-01 (MiniMax, 2025-01) 0.989
- MiniMax-M1 (MiniMax, 2025-06) 0.989
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
34 fields
| architectures | Glm4MoeForCausalLM |
|---|---|
| attention_bias | true |
| attention_dropout | 0 |
| pad_token_id | 151329 |
| eos_token_id | 151329×1 + 151336×1 + 151338×1 |
| head_dim | 128 |
| hidden_act | silu |
| hidden_size | 5120 |
| partial_rotary_factor | 0.5 |
| initializer_range | 0.02 |
| intermediate_size | 12288 |
| max_position_embeddings | 131072 |
| model_type | glm4_moe |
| moe_intermediate_size | 1536 |
| norm_topk_prob | true |
| num_attention_heads | 96 |
| n_group | 1 |
| topk_group | 1 |
| n_routed_experts | 160 |
| n_shared_experts | 1 |
| routed_scaling_factor | 2.5 |
| num_experts_per_tok | 8 |
| first_k_dense_replace | 3 |
| num_hidden_layers | 92 |
| num_key_value_heads | 8 |
| rms_norm_eps | 0.00001 |
| rope_theta | 1000000 |
| num_nextn_predict_layers | 1 |
| tie_word_embeddings | false |
| torch_dtype | bfloat16 |
| transformers_version | 4.54.0 |
| use_cache | true |
| use_qk_norm | true |
| vocab_size | 151552 |