The Rabbit Hole / AI / Model architectures
Google DeepMind · Architecture mapGemma 4 12B
A unified multimodal decoder: raw image patches and audio chunks enter through light projections, alongside a local/global attention stack.
Gemma 4 12B Unified, June 2026 (date from a news search result, not confirmed from an official page) · Gemma release timeline
Inside Gemma 4 12B
Inside grouped-query attention · Local layers (all except every 6th)
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Inside multi-query attention · Global layers (6, 12, 18, 24, 30, 36, 42, 48)
Earlier context dimmed · current token bright · dashed regions contain cached entries.
Model-specific details
- Local layers (all except every 6th) · 40 repetitions
- Sliding-window attention, then a dense feed-forward network 15,360 wide.
- Global layers (6, 12, 18, 24, 30, 36, 42, 48) · 8 repetitions
- Full attention, then a dense feed-forward network 15,360 wide.
- Attention and positions
- 16 query heads. Local layers use 8 key/value heads of 256 values over a 1,024-token window. Global layers use 512-wide heads with 1 key/value head, and keys double as values (attention_k_eq_v). Global layers rotate only a quarter of each head.
- Memory
- Local layers: keys and values for 8 heads of 256 values over the last 1,024 tokens. Global layers: 1 head of 512 values, with keys reused as values.
Direct multimodal inputs
Image patches and audio chunks are projected directly into the 48-layer decoder, without separate encoder towers. The text stream has width 3,840.
- Local attention uses a 1,024-token window, 16 query heads and eight key/value heads.
- Every sixth layer is global, with 512-wide heads and one key/value head; keys also serve as values.
- Supported context: 262,144 tokens.
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 |
|---|---|---|
| Gemma 4 12B | 14 | AA Index 4.3.2Best evaluated setting |
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
- QK normalisation (QK-Norm) and soft-capping
- RoPE: position as a rotation
- Transformer layers: attention is only half of what you need
- Vision encoders: how can image patches join the text?
- Audio inputs: how can a language model listen?
- Attention, from scratch
- The KV cache: why LLMs remember every key and value