Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

xAI · Architecture map

Grok-2.5

A larger Grok-1 style stack where every MoE layer also has a dense branch, and attention, router and output logits are all soft-capped.

Grok 2 weights on Hugging Face (called Grok 2.5), August 2025 · Grok release timeline

Inside Grok-2.5

Parameters
Not stated
Layers
64
Width
8,192
Mixer
Grouped-query
Select a component to explore it.
The complete Grok-2.5 architectureInput IDs select embeddings. Each layer adds its updates along the residual stream. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16). 8 keys and 8 values of 128 values per token per layer. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup131,0728,192Input token vectorsCL8,192Transformer layers 1–64Transformer layers 1–64 · 64 repetitions64 layers · one layer shown64RMSNorm before this operation.RMSNormGrouped-query attention: 8 experts of 16,384 wide with a GELU gate, 2 selected per token, beside a dense network of 32,768 (`residual_moe` is true). Both read the same normalised input; their outputs are added and divided by the square root of 2. Attention is global in every layer.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. 8 experts of 16,384 wide with a GELU gate, 2 selected per token, beside a dense network of 32,768 (`residual_moe` is true). Both read the same normalised input; their outputs are added and divided by the square root of 2. Attention is global in every layer.RoPE64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Score cap 30Normalise the branch output before the residual update.RMSNormAdd the branch output to the original stream. +RMSNorm before this operation.RMSNormMoE: 8 experts of 16,384 wide with a GELU gate, 2 selected per token, beside a dense network of 32,768 (`residual_moe` is true). Both read the same normalised input; their outputs are added and divided by the square root of 2. Attention is global in every layer.MoE2 of 8 routed experts selected per token. Highlighted boxes are schematic; boxes do not correspond one-to-one to experts.Normalise the branch output before the residual update.RMSNormAdd the branch output to the original stream. +2 of 8 experts +always-on denseResidual streamLast columnCL8,192Final RMSNormA separate learned vocabulary projection.Output weights8,192131,072Vocabulary scoresSoftmax131,072Next-token probabilities
Inside grouped-query attention · Transformer layers 1–64
8 query heads per group × 8 K/V groups.

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

Grok-2.5: Transformer layers 1–64 · grouped-query attention64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16). 8 keys and 8 values of 128 values per token per layer.8 KV groups; the front face shows one representative.8 KV groups8 heads / group; the front face shows one representative.8 heads / groupAttention input. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Earlier context is dimmed; outlined columns are current.Current token computation.Attention input8,192CLWq. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Wq8,192128Wk. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Wk8,192128Wv. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Wv8,192128RoPE. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).RoPERoPE. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).RoPEK cache. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache128CLV cache. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache128CLQ context. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Earlier context is dimmed; outlined columns are current.Current token computation.Q context128CLScaled query–key scores, masking and softmax. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Cap 30CLCL×. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).×Joined heads. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).64Wo. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Wo8,1928,192Attention output. 64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).Earlier context is dimmed; outlined columns are current.Current token computation.Attention output8,192CL
Model-specific details
Transformer layers 1–64 · 64 repetitions
8 experts of 16,384 wide with a GELU gate, 2 selected per token, beside a dense network of 32,768 (`residual_moe` is true). Both read the same normalised input; their outputs are added and divided by the square root of 2. Attention is global in every layer.
Attention and positions
64 query heads share 8 key/value heads, each 128 wide. Attention logits are soft-capped at 30. The config shows a context of 131,072 positions with rope scaling from an original 8,192 (factor 16).
Memory
8 keys and 8 values of 128 values per token per layer.

Dense and expert paths together

Each layer combines a dense network of width 32,768 with two selected experts out of eight, each of width 16,384. Their outputs are added, divided by the square root of two and normalised before the residual update.

These are the Grok 2 weights released as Grok 2.5 in August 2025.

Explore the components

Sources for this map