Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

Zhipu AI (Z.ai) · Architecture map

GLM-4.5

Grouped-query attention with partial rotary positions and a few dense layers before the experts.

GLM-4.5, August 2025 · GLM release timeline

Inside GLM-4.5

Size
Parameters
355B · 32B active
Layers
92
Width
5,120
Mixer
Grouped-query
Select a component to explore it.
The complete GLM-4.5 architectureInput IDs select embeddings. Each layer adds its updates along the residual stream. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head. Keys and values for 8 heads of size 128 per token per layer. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup151,5525,120Input token vectorsCL5,120Transformer layers 1–3Transformer layers 1–3 · 3 repetitions3 layers · one layer shown3RMSNorm before this operation.RMSNormGrouped-query attention: Dense feed-forward networks (intermediate size 12288).Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Dense feed-forward networks (intermediate size 12288).RoPE96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.QKV biasAdd the branch output to the original stream. +RMSNorm before this operation.RMSNormDense feed-forward: Dense feed-forward networks (intermediate size 12288).Densefeed-forwardAdd the branch output to the original stream. +Transformer layers 4–92Transformer layers 4–92 · 89 repetitions89 layers · one layer shown89RMSNorm before this operation.RMSNormGrouped-query attention: 160 routed experts (size 1536), 8 chosen per token, plus 1 shared expert. Sigmoid-style top-k with normalised weights, scaling factor 2.5.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. 160 routed experts (size 1536), 8 chosen per token, plus 1 shared expert. Sigmoid-style top-k with normalised weights, scaling factor 2.5.RoPE96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.QKV biasAdd the branch output to the original stream. +RMSNorm before this operation.RMSNormMoE: 160 routed experts (size 1536), 8 chosen per token, plus 1 shared expert. Sigmoid-style top-k with normalised weights, scaling factor 2.5.MoE8 of 160 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts. 1 shared experts run for every token.Add the branch output to the original stream. +8 of 160 experts + 1sharedResidual streamLast columnCL5,120Final RMSNormA separate learned vocabulary projection.Output weights5,120151,552Vocabulary scoresSoftmax151,552Next-token probabilities
Inside grouped-query attention · Transformer layers 1–3
12 query heads per group × 8 K/V groups.

Earlier context dimmed · current token bright · dashed regions contain cached entries.

GLM-4.5: Transformer layers 1–3 · grouped-query attention96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head. Keys and values for 8 heads of size 128 per token per layer.8 KV groups; the front face shows one representative.8 KV groups12 heads / group; the front face shows one representative.12 heads / groupAttention input. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input5,120CLWq. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Wq + b5,120128Wk. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Wk + b5,120128Wv. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Wv + b5,120128RMSNorm. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.RMSNormRoPE 64. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.RoPE 64RMSNorm. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.RMSNormRoPE 64. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.RoPE 64K cache. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache128CLV cache. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache128CLQ context. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Q context128CLScaled query–key scores, masking and softmax. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.CLCL×. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.×Joined heads. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.96Wo. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Wo12,2885,120Attention output. 96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output5,120CL
Model-specific details
Transformer layers 1–3 · 3 repetitions
Dense feed-forward networks (intermediate size 12288).
Transformer layers 4–92 · 89 repetitions
160 routed experts (size 1536), 8 chosen per token, plus 1 shared expert. Sigmoid-style top-k with normalised weights, scaling factor 2.5.
Attention and positions
96 query heads share 8 key/value heads of size 128. Biases on the query, key and value projections (not the output), query/key normalisation, and rotary applied to half of each head.
Memory
Keys and values for 8 heads of size 128 per token per layer.

Full and Air

The 355B-A32B stack has 92 layers, with 96 query heads sharing eight 128-wide key/value heads. The picker also includes Air 106B-A12B.

Both sizes support a 131,072-token context and share thinking/non-thinking modes within the same layout.

How it scores

AA Intelligence Index

Version 4.3.2 · higher is better · checked 2026-11-01. Separate from Epoch ECI.

Checkpoint / sizeResultEvaluation
GLM-4.5355B-A32B13AA Index 4.3.2Published checkpoint
GLM-4.5-AirAir 106B-A12B11AA Index 4.3.2Published checkpoint
AA Index distributionBest checkpoint per model variant among 97 scored variants in this atlas. GLM-4.5 scores 13; its bin is highlighted. Known estimates are excluded.Model variants0.0–3.0: 0 variants3.0–6.0: 15 variants6.0–9.0: 21 variants9.0–12.0: 13 variants12.0–15.0: 9 variants15.0–18.0: 5 variants18.0–21.0: 5 variants21.0–24.0: 6 variants24.0–27.0: 4 variants27.0–30.0: 2 variants30.0–33.0: 2 variants33.0–36.0: 2 variants36.0–39.0: 2 variants39.0–42.0: 3 variants42.0–45.0: 4 variants45.0–48.0: 3 variants48.0–51.0: 0 variants51.0–54.0: 0 variants54.0–57.0: 1 variants57.0–60.0: 0 variants21003060AA Index 4.3.2 →
GLM-4.5: 13. Distribution of 97 scored variants in this atlas, using each variant’s best checkpoint. Known estimates excluded.

Explore the components

Sources for this map