GLM · 2025-10 · Sparse MoE

GLM-4.6

GLM-4.6 is a grouped-query attention (GQA) transformer released by GLM in 2025-10, with 92 layers, hidden size 5120 and a context window of 202,752 tokens.

Layer stack

Attention ×92 · Layers 92

Key facts

FamilyGLM
Released2025-10
Params360.4 B
Active32.7 B
Context202,752 tokens
AttentionGQA (96:8)
Layers92
Hidden5,120
Heads96
Vocab151,552
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classGlm4MoeForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 151,552 → Hidden 5,120 Q1 Q2 Q3 Qn KV1 KV2 KV3 KVn Heads 96 KV heads 8 head dim 128 · RoPE Router E1 E2 E3 E4 E5 E6 E7 E8 +152… Shared expert ×1 top-8 of 160 experts · ≈ 32.7B params active per token × 92 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 151,552 p p p → next token MTP ×1 → +1 future tokens Position RoPE Dtype BF16 Context 198K tok
Drawn from the shipped config.json · 92 layers / width 5,120 / context 202,752. Original diagram by this atlas.

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.5-Air
ModelGLM-4.6GLM-4.5-AirRatio
model_typeglm4_moeglm4_moe
architecturesGlm4MoeForCausalLMGlm4MoeForCausalLM
hidden_size51204096×1.25
num_hidden_layers9246×2.00
num_attention_heads9696≈1
num_key_value_heads88≈1
head_dim128128≈1
intermediate_size1228810944×1.12
hidden_actsilusilu
n_routed_experts160128×1.25
num_experts_per_tok88≈1
n_shared_experts11≈1
moe_intermediate_size15361408×1.09
rope_theta10000001000000≈1
max_position_embeddings202752131072×1.55
rms_norm_eps0.000010.00001≈1
vocab_size151552151552≈1
torch_dtypebfloat16bfloat16
num_nextn_predict_layers11≈1
attention_biastruetrue
attention_dropout00
pad_token_id151329151329≈1
eos_token_id151329×1 + 151336×1 + 151338×1151329×1 + 151336×1 + 151338×1
partial_rotary_factor0.50.5≈1
initializer_range0.020.02≈1
norm_topk_probtruetrue

Most similar architectures

Similarity values range from 0 (no shared categorical features) to 1 (identical profiles).

Raw config fields

34 fields
architecturesGlm4MoeForCausalLM
attention_biastrue
attention_dropout0
pad_token_id151329
eos_token_id151329×1 + 151336×1 + 151338×1
head_dim128
hidden_actsilu
hidden_size5120
partial_rotary_factor0.5
initializer_range0.02
intermediate_size12288
max_position_embeddings202752
model_typeglm4_moe
moe_intermediate_size1536
norm_topk_probtrue
num_attention_heads96
n_group1
topk_group1
n_routed_experts160
n_shared_experts1
routed_scaling_factor2.5
num_experts_per_tok8
first_k_dense_replace3
num_hidden_layers92
num_key_value_heads8
rms_norm_eps0.00001
rope_theta1000000
num_nextn_predict_layers1
tie_word_embeddingsfalse
torch_dtypebfloat16
transformers_version4.54.0
use_cachetrue
use_qk_normtrue
vocab_size151552