GLM · 2026-04 · Sparse MoE
GLM-5.1
GLM-5.1 is a multi-head latent attention (MLA) transformer released by GLM in 2026-04, with 78 layers, hidden size 6144 and a context window of 202,752 tokens.
Layer stack
Attention ×78 · Layers 78
Key facts
| Family | GLM |
|---|---|
| Released | 2026-04 |
| Params | 744 B |
| Active | 40 B |
| Context | 202,752 tokens |
| Attention | MLA · kv_lora_rank 512 |
| Layers | 78 |
| Hidden | 6,144 |
| Heads | 64 |
| Vocab | 154,880 |
| Position | learned/absolute |
| Norm | RMSNorm |
| Activation | silu |
| Dtype | fp8 |
| Architecture class | GlmMoeDsaForCausalLM |
Architecture overview
Attention
multi-head latent attention (MLA). kv_lora_rank=512.
Feed-forward / MoE
It is a sparse mixture-of-experts with 256 routed experts and top-8 routing; about 40B 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-5
| Model | GLM-5.1 | GLM-5 | Ratio |
|---|---|---|---|
| model_type | glm_moe_dsa | glm_moe_dsa | = |
| architectures | GlmMoeDsaForCausalLM | GlmMoeDsaForCausalLM | = |
| hidden_size | 6144 | 6144 | ≈1 |
| num_hidden_layers | 78 | 78 | ≈1 |
| num_attention_heads | 64 | 64 | ≈1 |
| num_key_value_heads | 64 | 64 | ≈1 |
| head_dim | 64 | 64 | ≈1 |
| intermediate_size | 12288 | 12288 | ≈1 |
| hidden_act | silu | silu | = |
| n_routed_experts | 256 | 256 | ≈1 |
| num_experts_per_tok | 8 | 8 | ≈1 |
| n_shared_experts | 1 | 1 | ≈1 |
| moe_intermediate_size | 2048 | 2048 | ≈1 |
| kv_lora_rank | 512 | 512 | ≈1 |
| qk_rope_head_dim | 64 | 64 | ≈1 |
| q_lora_rank | 2048 | 2048 | ≈1 |
| max_position_embeddings | 202752 | 202752 | ≈1 |
| rms_norm_eps | 0.00001 | 0.00001 | ≈1 |
| vocab_size | 154880 | 154880 | ≈1 |
| num_nextn_predict_layers | 1 | 1 | ≈1 |
| attention_bias | false | false | = |
| attention_dropout | 0 | 0 | = |
| dtype | bfloat16 | bfloat16 | = |
| eos_token_id | 154820×1 + 154827×1 + 154829×1 | 154820×1 + 154827×1 + 154829×1 | = |
| ep_size | 1 | 1 | ≈1 |
| first_k_dense_replace | 3 | 3 | ≈1 |
Most similar architectures
- GLM-5 (GLM, 2026-02) 1.000
- Hunyuan 4 Preview (Hunyuan, 2026-08) 0.999
- GLM-5.2 (GLM, 2026-06) 0.999
- GLM-5.3 (GLM, 2026-08) 0.999
- GLM-5.3-Flash (GLM, 2026-08) 0.992
- Kimi K2 0905 (Kimi, 2025-09) 0.938
Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).
Raw config fields
47 fields
| architectures | GlmMoeDsaForCausalLM |
|---|---|
| attention_bias | false |
| attention_dropout | 0 |
| dtype | bfloat16 |
| eos_token_id | 154820×1 + 154827×1 + 154829×1 |
| ep_size | 1 |
| first_k_dense_replace | 3 |
| hidden_act | silu |
| head_dim | 64 |
| hidden_size | 6144 |
| index_head_dim | 128 |
| index_n_heads | 32 |
| index_topk | 2048 |
| indexer_rope_interleave | true |
| initializer_range | 0.02 |
| intermediate_size | 12288 |
| kv_lora_rank | 512 |
| max_position_embeddings | 202752 |
| moe_intermediate_size | 2048 |
| moe_layer_freq | 1 |
| model_type | glm_moe_dsa |
| n_group | 1 |
| n_routed_experts | 256 |
| n_shared_experts | 1 |
| norm_topk_prob | true |
| num_attention_heads | 64 |
| num_experts_per_tok | 8 |
| num_hidden_layers | 78 |
| num_key_value_heads | 64 |
| num_nextn_predict_layers | 1 |
| pad_token_id | 154820 |
| pretraining_tp | 1 |
| q_lora_rank | 2048 |
| qk_head_dim | 256 |
| qk_nope_head_dim | 192 |
| qk_rope_head_dim | 64 |
| rms_norm_eps | 0.00001 |
| rope_interleave | true |
| routed_scaling_factor | 2.5 |
| scoring_func | sigmoid |
| tie_word_embeddings | false |
| topk_group | 1 |
| topk_method | noaux_tc |
| transformers_version | 5.4.0 |
| use_cache | true |
| v_head_dim | 256 |
| vocab_size | 154880 |