The Rabbit Hole / AI / Model architectures
NVIDIA · Architecture map Nemotron-4 340B A big dense model with an ungated feed-forward network that uses squared ReLU in place of SwiGLU.
Nemotron-4-340B-Base, June 2024 · NVIDIA release timeline
Architecture map What to notice Component articles Compare with another model Sources Inside Nemotron-4 340B
Parameters 340B
Layers 96
Width 18,432
Mixer Grouped-query Select a component to explore it. Inside grouped-query attention · Transformer layers 1–96 12 query heads per group × 8 K/V groups. Earlier context dimmed · current token bright · dashed regions contain cached entries.
Nemotron-4 340B: Transformer layers 1–96 · grouped-query attention 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Keys and values for 8 heads of size 192, per token per layer. 8 KV groups; the front face shows one representative. 8 KV groups 12 heads / group; the front face shows one representative. 12 heads / group Attention input. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Earlier context is dimmed; outlined columns are current. Current token computation. Attention input 18,432 CL Wq. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Wq 18,432 192 Wk. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Wk 18,432 192 Wv. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Wv 18,432 192 RoPE 96. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. RoPE 96 RoPE 96. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. RoPE 96 K cache. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Earlier columns are cached; outlined columns are newly computed. Cached positions from earlier decoding steps. Current token computation. K cache 192 CL V cache. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Earlier columns are cached; outlined columns are newly computed. Cached positions from earlier decoding steps. Current token computation. V cache 192 CL Q context. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Earlier context is dimmed; outlined columns are current. Current token computation. Q context 192 CL Scaled query–key scores, masking and softmax. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. CL CL ×. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. × Joined heads. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. 96 Wo. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Wo 18,432 18,432 Attention output. 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Earlier context is dimmed; outlined columns are current. Current token computation. Attention output 18,432 CL Model-specific details Transformer layers 1–96 · 96 repetitions A plain two-matrix feed-forward network (hidden size 73728, four times the width) with squared ReLU activation, with no gate. Attention and positions 96 query heads share 8 key/value heads (head size 192). Rotary positions applied to half of each head (rotary percentage 0.5). Training sequence length 4096. Memory Keys and values for 8 heads of size 192, per token per layer.
Ninety-six layers at width 18,432, with squared-ReLU feed-forward intermediate width 73,728.
Ninety-six query heads share eight key/value heads. RoPE rotates half of each head.
LayerNorm uses a scale stored as an offset from one.
Untied embeddings and a 256,000-token vocabulary.
The Base checkpoint trained on 4,096-token sequences. The Instruct and Reward checkpoints derive from this backbone.
Explore the components Sources for this map