The Rabbit Hole / AI / Model architectures
iFlytek / XHToken · Architecture mapSpark 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
Inside grouped-query attention · Sliding-window layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside grouped-query attention · Global layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
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.
Inside grouped-query attention · Sliding-window layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside grouped-query attention · Global layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
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.
Inside grouped-query attention · Sliding-window layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside grouped-query attention · Global layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Sliding-window layers · 21 repetitions
- 512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 6656.
- Global layers · 7 repetitions
- Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.
- Attention and positions
- 8 query heads share two KV heads of width 256. Local layers rotate all 256 coordinates; global layers rotate 64. Every attention head has a sigmoid output gate.
- Memory
- Two KV heads per layer: 21 local 512-token windows and seven full-prefix caches.
Inside grouped-query attention · Sliding-window layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside grouped-query attention · Global layers
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Sliding-window layers · 21 repetitions
- 512-token sliding window, full rotary positions with base 10000, head-wise sigmoid output gate, then GEGLU at intermediate width 6656.
- Global layers · 7 repetitions
- Full-context attention with partial rotary positions (64 of 256 dimensions, base 5000000), then the same feed-forward block.
- Attention and positions
- 8 query heads share two KV heads of width 256. Local layers rotate all 256 coordinates; global layers rotate 64. Every attention head has a sigmoid output gate.
- Memory
- Two KV heads per layer: 21 local 512-token windows and seven full-prefix caches.
One architecture, two releases
- X2.6 retains X2.5’s architecture and improves post-training.
- Every fourth layer reads the full context; the other 27 layers use a 512-token window.
- Global layers rotate a quarter of each head; local layers rotate the whole head.
- Each head’s output is gated, and the feed-forward network uses GEGLU.
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
- Embeddings: giving every token a meaning
- Residual connections: when more layers made things worse
- A whole LLM, layer by layer
- RMSNorm: keeping a token's scale under control
- Grouped-query attention (GQA): sharing keys and values in groups
- Sliding-window attention (SWA): a cache that stops growing
- Attention gating: should this head add anything?
- Partial RoPE: rotating only part of each head
- Transformer layers: attention is only half of what you need
- Attention, from scratch
- The KV cache: why LLMs remember every key and value