GLM · 2026-01 · Sparse MoE

GLM-4.7-Flash

GLM-4.7-Flash is a multi-head latent attention (MLA) transformer released by GLM in 2026-01, with 47 layers, hidden size 2048 and a context window of 202,752 tokens.

Layer stack

Attention ×47 · Layers 47

Key facts

FamilyGLM
Released2026-01
Params29.4 B
Active3.2 B
Context202,752 tokens
AttentionMLA · kv_lora_rank 512
Layers47
Hidden2,048
Heads20
Vocab154,880
PositionRoPE
NormRMSNorm
Activationsilu
Dtypebf16
Architecture classGlm4MoeLiteForCausalLM

Architecture overview

t₁ t₂ t₃ t₄ input tokens Embedding · Vocab 154,880 → Hidden 2,048 Q · 20 Wᴰᴷⱽ ↓ c_KV · 512 kᴿ · RoPE 64 Wᵁᴷ/Wᵁⱽ ↑ ⊕kᴿ Attention KV cache/token ≈ 512+64 vs dense 2·2,048 → ≈ 1/7.1 Router E1 E2 E3 E4 E5 E6 E7 E8 +56… Shared expert ×1 top-4 of 64 experts · ≈ 3.2B params active per token × 47 transformer block Attention Feed-forward / MoE RMSNorm pre-norm Final norm · RMSNorm LM head → Vocab 154,880 p p p → next token MTP ×1 → +1 future tokens Position RoPE Dtype BF16 Context 198K tok
Drawn from the shipped config.json · 47 layers / width 2,048 / context 202,752. Original diagram by this atlas.

Attention

multi-head latent attention (MLA). kv_lora_rank=512. RoPE θ=1,000,000.

Feed-forward / MoE

It is a sparse mixture-of-experts with 64 routed experts and top-4 routing; about 3.2B 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.6
ModelGLM-4.7-FlashGLM-4.6Ratio
model_typeglm4_moe_liteglm4_moe
architecturesGlm4MoeLiteForCausalLMGlm4MoeForCausalLM
hidden_size20485120×0.400
num_hidden_layers4792×0.511
num_attention_heads2096×0.208
num_key_value_heads208×2.50
head_dim128
intermediate_size1024012288×0.833
hidden_actsilusilu
n_routed_experts64160×0.400
num_experts_per_tok48×0.500
n_shared_experts11≈1
moe_intermediate_size15361536≈1
kv_lora_rank512
qk_rope_head_dim64
q_lora_rank768
rope_theta10000001000000≈1
max_position_embeddings202752202752≈1
rms_norm_eps0.000010.00001≈1
vocab_size154880151552×1.02
torch_dtypebfloat16
num_nextn_predict_layers11≈1
attention_biasfalsetrue
attention_dropout00
pad_token_id154820151329×1.02
eos_token_id154820×1 + 154827×1 + 154829×1151329×1 + 151336×1 + 151338×1

Most similar architectures

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

Raw config fields

36 fields
architecturesGlm4MoeLiteForCausalLM
attention_biasfalse
attention_dropout0
pad_token_id154820
eos_token_id154820×1 + 154827×1 + 154829×1
hidden_actsilu
hidden_size2048
intermediate_size10240
max_position_embeddings202752
model_typeglm4_moe_lite
moe_intermediate_size1536
topk_methodnoaux_tc
norm_topk_probtrue
num_attention_heads20
n_group1
topk_group1
n_routed_experts64
n_shared_experts1
routed_scaling_factor1.8
num_experts_per_tok4
first_k_dense_replace1
num_hidden_layers47
num_key_value_heads20
num_nextn_predict_layers1
partial_rotary_factor1
rms_norm_eps0.00001
rope_theta1000000
tie_word_embeddingsfalse
dtypebfloat16
transformers_version5.0.0rc0
q_lora_rank768
kv_lora_rank512
qk_nope_head_dim192
qk_rope_head_dim64
v_head_dim256
vocab_size154880