Rúben GalvãoThe Rabbit Hole

The Rabbit Hole / AI / Model architectures

NVIDIA · Architecture map

Nemotron Labs Dory 1.0 4B

A normalised transformer that reuses a shared 20-block stack, with the input state reinjected on every pass.

NVIDIA-Nemotron-Labs-Dory1.0-4B-BF16, 16 October 2026 · NVIDIA release timeline

Inside Nemotron Labs Dory 1.0 4B

Parameters
4B
Layers
36 blocks · 56 block evaluations at 2 loops
Width
2,560
Mixer
Grouped-query
Select a component to explore it. Layer colours match the execution-order strip.
The complete Nemotron Labs Dory 1.0 4B architectureInput IDs select embeddings. Layer types execute in the order strip; dotted lines connect the type examples below. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection. Per-loop caching stores separate keys and values for each recurrent pass. Last-loop caching instead overwrites one cache per recurrent attention layer, retaining the final pass for earlier tokens. Local layers keep at most 1024 tokens. The default diagram and cache sizes use two loops with separate caches. 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 blocksLayer 1: Local attention · InputLayer 2: Local attention · InputLayer 3: Local attention · InputLayer 4: Full attention · InputLayer 5: Local attention · InputLayer 6: Local attention · InputLayer 7: Local attention · InputLayer 8: Full attention · InputLayer 9: Local attention · Shared recurrent blockLayer 10: Local attention · Shared recurrent blockLayer 11: Local attention · Shared recurrent blockLayer 12: Full attention · Shared recurrent blockLayer 13: Local attention · Shared recurrent blockLayer 14: Local attention · Shared recurrent blockLayer 15: Local attention · Shared recurrent blockLayer 16: Full attention · Shared recurrent blockLayer 17: Local attention · Shared recurrent blockLayer 18: Local attention · Shared recurrent blockLayer 19: Local attention · Shared recurrent blockLayer 20: Full attention · Shared recurrent blockLayer 21: Local attention · Shared recurrent blockLayer 22: Local attention · Shared recurrent blockLayer 23: Local attention · Shared recurrent blockLayer 24: Full attention · Shared recurrent blockLayer 25: Local attention · Shared recurrent blockLayer 26: Local attention · Shared recurrent blockLayer 27: Local attention · Shared recurrent blockLayer 28: Full attention · Shared recurrent blockLayer 29: Local attention · OutputLayer 30: Local attention · OutputLayer 31: Local attention · OutputLayer 32: Full attention · OutputLayer 33: Local attention · OutputLayer 34: Local attention · OutputLayer 35: Local attention · OutputLayer 36: Full attention · OutputThe input and output blocks run once. The same 20 blocks repeat 2 times; every pass adds the saved input-block output and L2-normalises the result.Input · 8Shared · 20Output · 8+L2-normSaved input state2 passes · same weightsInput · blocks 1–8Local attention · Input · matches this colour in the execution-order barLocal attention · InputLocal attention · Input · 6 repetitions6 blocks · one block shown6Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normSliding-window attention over 1,024 tokens.1,024Normalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveFull attention · Input · matches this colour in the execution-order barFull attention · InputFull attention · Input · 2 repetitions2 blocks · one block shown2Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveShared recurrent block · blocks 9–28Local attention · Shared recurrent block · matches this colour in the execution-order barLocal attention · Shared recurrent …Local attention · Shared recurrent block · 15 repetitions15 blocks · one block shown15Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normSliding-window attention over 1,024 tokens.1,024Normalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveFull attention · Shared recurrent block · matches this colour in the execution-order barFull attention · Shared recurrent b…Full attention · Shared recurrent block · 5 repetitions5 blocks · one block shown5Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveOutput · blocks 29–36Local attention · Output · matches this colour in the execution-order barLocal attention · OutputLocal attention · Output · 6 repetitions6 blocks · one block shown6Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normSliding-window attention over 1,024 tokens.1,024Normalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveFull attention · Output · matches this colour in the execution-order barFull attention · OutputFull attention · Output · 2 repetitions2 blocks · one block shown2Gated GQA: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.Gated GQARotate query and key position components before attention scores; values are unchanged. nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.RoPENormalise queries and keys before attention scores. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.QK L2-normNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normSwiGLU: nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.SwiGLUNormalise the branch output before the residual update.L2-normResidual combination. Combine the residual and branch contributions using the model’s learned weighting. +α mixNormalise the branch and residual, interpolate using the learned per-coordinate α, then L2-normalise the result.L2-normLayer type · execution order aboveAfter all 56 layer executionsnGPT residual streamLast columnCL2,560A separate learned vocabulary projection.Output weights2,560131,072Scaled vocabulary scoresSoftmax131,072Next-token probabilities
Inside grouped-query attention · Local attention · Input
4 query heads per group × 4 K/V groups.

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

Nemotron Labs Dory 1.0 4B: Local attention · Input · grouped-query attention16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection. Per-loop caching stores separate keys and values for each recurrent pass. Last-loop caching instead overwrites one cache per recurrent attention layer, retaining the final pass for earlier tokens. Local layers keep at most 1024 tokens. The default diagram and cache sizes use two loops with separate caches.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 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,560CLWq. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wq2,560256Wk. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wk2,560256Wv. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wv2,560256RoPE. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.RoPEL2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-normQuery scale. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Query scaleRoPE. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.RoPEL2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-normK cache. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.K cache256≤ 1024V cache. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier columns are cached; outlined columns are newly computed.Cached positions from earlier decoding steps.Current token computation.V cache256≤ 1024Q context. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Window 1,024CLCL×. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.×Wg. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wg2,560256σ. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.σ×. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.×Joined heads. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.16L2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-norm4,096Wo. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wo4,0962,560Attention output. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,560CL
Inside grouped-query attention · Full attention · Input
4 query heads per group × 4 K/V groups.

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

Nemotron Labs Dory 1.0 4B: Full attention · Input · grouped-query attention16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection. Per-loop caching stores separate keys and values for each recurrent pass. Last-loop caching instead overwrites one cache per recurrent attention layer, retaining the final pass for earlier tokens. Local layers keep at most 1024 tokens. The default diagram and cache sizes use two loops with separate caches.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 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Attention input2,560CLWq. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wq2,560256Wk. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wk2,560256Wv. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wv2,560256RoPE. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.RoPEL2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-normQuery scale. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Query scaleRoPE. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.RoPEL2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-normK cache. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.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 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.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 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Q context256CLScaled query–key scores, masking and softmax. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.CLCL×. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.×Wg. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wg2,560256σ. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.σ×. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.×Joined heads. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.16L2-norm. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.L2-norm4,096Wo. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Wo4,0962,560Attention output. 16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.Earlier context is dimmed; outlined columns are current.Current token computation.Attention output2,560CL
Model-specific details
Local attention · Input · 6 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Full attention · Input · 2 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Local attention · Shared recurrent block · 15 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Full attention · Shared recurrent block · 5 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Local attention · Output · 6 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Full attention · Output · 2 repetitions
nGPT normalises vectors and combines the residual and branch with learned per-coordinate interpolation, followed by L2 normalisation. SwiGLU intermediate width 7168.
Attention and positions
16 query heads share 4 key/value heads, each 256 wide. Three sliding-window blocks (1024 tokens) alternate with one full-attention block. RoPE covers the whole head; Q/K L2 normalisation follows RoPE, with learned coordinate scaling on Q. A coordinate-wise sigmoid gate acts before the output projection.
Memory
Per-loop caching stores separate keys and values for each recurrent pass. Last-loop caching instead overwrites one cache per recurrent attention layer, retaining the final pass for earlier tokens. Local layers keep at most 1024 tokens. The default diagram and cache sizes use two loops with separate caches.

More depth from the same weights

Explore the components

Sources for this map