Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

iFlytek / XHToken · Architecture map

Spark X2.5 and X2.6

Gated grouped-query transformers at 1.7B and 4B, with three 512-token windows per global layer.

Spark-X2.5 and X2.6, 4B and 1.7B; new X2.6 size 27 October 2026 · Spark release timeline

Inside Spark X2.5 and X2.6

Size
Parameters
4.1B
Layers
36
Width
2,560
Mixer
Grouped-query
Select a component to explore it. Layer colours match the execution-order strip.
The complete Spark X2.5 and X2.6 architectureInput IDs select embeddings. Layer types execute in the order strip; dotted lines connect the type examples below. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate. Four KV heads per layer. Sliding layers attend to 512 tokens; global layers retain the full prefix. Final normalisation and output weights produce vocabulary scores and the next-token distribution.Text becomes token IDs.Text → tokens → IDstheoldrabbitsleepsEmbedding lookup131,0722,560Input token vectorsCL2,560Execution order · 36 layersLayer 1: Sliding-window layersLayer 2: Sliding-window layersLayer 3: Sliding-window layersLayer 4: Global layersLayer 5: Sliding-window layersLayer 6: Sliding-window layersLayer 7: Sliding-window layersLayer 8: Global layersLayer 9: Sliding-window layersLayer 10: Sliding-window layersLayer 11: Sliding-window layersLayer 12: Global layersLayer 13: Sliding-window layersLayer 14: Sliding-window layersLayer 15: Sliding-window layersLayer 16: Global layersLayer 17: Sliding-window layersLayer 18: Sliding-window layersLayer 19: Sliding-window layersLayer 20: Global layersLayer 21: Sliding-window layersLayer 22: Sliding-window layersLayer 23: Sliding-window layersLayer 24: Global layersLayer 25: Sliding-window layersLayer 26: Sliding-window layersLayer 27: Sliding-window layersLayer 28: Global layersLayer 29: Sliding-window layersLayer 30: Sliding-window layersLayer 31: Sliding-window layersLayer 32: Global layersLayer 33: Sliding-window layersLayer 34: Sliding-window layersLayer 35: Sliding-window layersLayer 36: Global layersSliding-window layers · matches this colour in the execution-order barSliding-window layersSliding-window layers · 27 repetitions27 layers · one layer shown27RMSNorm before this operation.RMSNormGrouped-query attention: 512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 10240.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. 512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 10240.RoPE16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Output gateSliding-window attention over 512 tokens.512Add the branch output to the original stream. +RMSNorm before this operation.RMSNormGEGLU: 512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 10240.GEGLUAdd the branch output to the original stream. +Layer type · execution order aboveGlobal layers · matches this colour in the execution-order barGlobal layersGlobal layers · 9 repetitions9 layers · one layer shown9RMSNorm before this operation.RMSNormGrouped-query attention: Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.Grouped-queryattentionRotate query and key position components before attention scores; values are unchanged. Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.RoPE16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Output gateAdd the branch output to the original stream. +RMSNorm before this operation.RMSNormGEGLU: Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.GEGLUAdd the branch output to the original stream. +Layer type · execution order aboveAfter all 36 layer executionsResidual streamLast columnCL2,560Final RMSNormReuses the embedding table, transposed.Tied output weights2,560131,072Vocabulary scoresSoftmax131,072Next-token probabilities
Inside grouped-query attention · Sliding-window layers
4 query heads per group × 4 K/V groups.

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

Spark X2.5 and X2.6: Sliding-window layers · grouped-query attention16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate. Four KV heads per layer. Sliding layers attend to 512 tokens; global layers retain the full prefix.4 KV groups; the front face shows one representative.4 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,560CLWq. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wq2,560256Wk. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wk2,560256Wv. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wv2,560256RoPE. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.RoPERoPE. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.RoPEK cache. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256≤ 512V cache. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256≤ 512Q context. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Window 512CLCL×. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.×Wg. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wg2,5601σ. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.σ×. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.×Joined heads. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.16Wo. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wo4,0962,560Attention output. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,560CL
Inside grouped-query attention · Global layers
4 query heads per group × 4 K/V groups.

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

Spark X2.5 and X2.6: Global layers · grouped-query attention16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate. Four KV heads per layer. Sliding layers attend to 512 tokens; global layers retain the full prefix.4 KV groups; the front face shows one representative.4 KV groups4 heads / group; the front face shows one representative.4 heads / groupAttention input. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,560CLWq. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wq2,560256Wk. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wk2,560256Wv. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wv2,560256RoPE 64. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.RoPE 64RoPE 64. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.RoPE 64K cache. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256CLV cache. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256CLQ context. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.CLCL×. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.×Wg. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wg2,5601σ. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.σ×. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.×Joined heads. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.16Wo. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Wo4,0962,560Attention output. 16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,560CL
Model-specific details
Sliding-window layers · 27 repetitions
512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 10240.
Global layers · 9 repetitions
Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.
Attention and positions
16 query heads share four KV heads, width 256. Sliding layers rotate all 256 key dimensions; global layers rotate 64. Every head has a sigmoid output gate.
Memory
Four KV heads per layer. Sliding layers attend to 512 tokens; global layers retain the full prefix.

One architecture, two releases

The 1.7B sizes use width 2,048 and 28 layers (21 window, seven global), with eight query heads and two KV heads. X2.6-1.7B was released on 27 October; X2.6 changes post-training, not the architecture.

Explore the components

Sources for this map