The Rabbit Hole / AI / Model architectures
Alibaba Qwen · Architecture mapQwen3.8-Flash-Next
Three Gated DeltaNet layers per sparse-attention layer, four gated residual streams and an n-gram table feeding layer 2.
Qwen3.8-Flash-Next, August 2026 · Qwen release timeline
Inside Qwen3.8-Flash-Next
Inside linear attention · Layer 1
Earlier context dimmed · current token bright · dashed path carries state to the next step.
Inside grouped-query attention · Qwen Sparse Attention layers 4, 8, 12 and so on to 48
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Layer 1 · 1 repetitions
- Gated DeltaNet, then a mixture of experts.
- Layer 2 · 1 repetitions
- Gated DeltaNet, then a mixture of experts. The n-gram embedding is added to the four streams before this layer.
- n-gram embedding
- Hashed bigram and trigram embeddings, gated by the streams and passed through a short dilated convolution, added before this layer.
- Gated DeltaNet layers (three of every four) · 34 repetitions
- Linear attention, then 512 routed experts (size 640), 10 chosen per token, plus 1 shared expert (size 640).
- Qwen Sparse Attention layers 4, 8, 12 and so on to 48 · 12 repetitions
- Softmax attention restricted to the keys an indexer picks, in micro-blocks. Same MoE block as the other layers.
- block selection (indexer)
- An indexer scores keys compressed four to one and the layer reads the best 512 blocks (2048 tokens).
- Attention and positions
- 36 layers use Gated DeltaNet (16 query/key heads and 48 value heads of size 128, short convolution of width 4). 12 layers, every fourth, use Qwen Sparse Attention: 24 query heads share 2 key/value heads of size 256, with query/key norms, a sigmoid output gate and rotary on a quarter of each head (64 of 256, multimodal sections 11/11/10). A small indexer (4 query heads, 1 key head, size 128) scores keys compressed four to one and keeps a budget of 512 blocks, 2048 tokens.
- Memory
- Sparse-attention layers cache keys and values for 2 heads of size 256 per token, plus the indexer's keys. Gated DeltaNet layers keep a fixed-size state and a short convolution buffer, not a per-token cache.
Sparse attention and a wider residual
The 48-layer stack repeats three Gated DeltaNet layers and one sparse-attention layer. An indexer selects micro-blocks with a 2,048-token budget.
- Four gated residual streams.
- Hashed bigram/trigram embeddings enter at layer 2, adding about 51B lookup parameters.
- All layers select ten of 512 experts plus one shared expert, each of width 640.
- Sparse attention uses 24 query heads and two 256-wide key/value heads, QK-norm and partial RoPE.
The native context is 262,144 tokens; the card describes extension to 1M.
How it scores
AA Intelligence Index
Version 4.3.2 · higher is better · checked 2026-11-01. Separate from Epoch ECI.
| Checkpoint / size | Result | Evaluation |
|---|---|---|
| Qwen3.8-Flash-Next | 40 | AA Index 4.3.2Published checkpoint |
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
- Hyper-connections: more than one residual stream
- Gated DeltaNet: write the correction, not the whole fact
- Linear attention: a fixed-size memory instead of a growing cache
- Hybrid attention and SSM models: different kinds of memory
- Block-sparse attention: choosing blocks of keys, not single tokenscoming soonAttention that reads chosen blocks of keys instead of single tokens.
- Sparse attention and the lightning indexer
- Grouped-query attention (GQA): sharing keys and values in groups
- QK normalisation (QK-Norm) and soft-capping
- Attention gating: should this head add anything?
- Partial RoPE: rotating only part of each head
- N-gram memory: a lookup table for short runs of tokenscoming soonA big lookup table keyed by the last few tokens, read alongside the normal computation.
- Per-layer embeddings (PLE): could each layer look up the token again?
- Mixture of experts (MoE): a big model that uses only part of itself
- Multi-token prediction (MTP): learning to look further ahead
- Vision encoders: how can image patches join the text?
- Gated RMSNorm: controlling the layer's output
- Routing: selecting experts and weighting their work
- Attention, from scratch
- The KV cache: why LLMs remember every key and value
- RoPE: position as a rotation