# Gemma 4 (12B)

> Dense Gemma 4 12B Unified uses an encoder-free multimodal input path, while its text decoder keeps the 31B-style local-global attention recipe.

| Property | Value |
| --- | --- |
| Lab | Google (United States) |
| Released | 2026-06-03 |
| Decoder type | Dense |
| Family | Dense |
| Scale | 12B parameters |
| Context window | 128,000 tokens |
| Attention | GQA with QK-Norm, unified K/V on global layers, p-RoPE on global layers, and 5:1 sliding-window/global attention |
| Layer mix | 40 sliding-window + 8 global |
| KV cache / token (bf16) | 328 KiB (Very high) |
| License | Apache License 2.0 |

**Key detail:** Figure shows the 48-layer text decoder; the full 12B Unified model also projects audio, image, and video inputs directly into the decoder input stream.

## Architecture concepts

- [QK-Norm (QK-Norm)](https://llm-atlas-7or.pages.dev/concepts/qk-norm.md): RMSNorm applied to queries and keys before attention to keep logits well-behaved.
- [Grouped-Query Attention (GQA)](https://llm-atlas-7or.pages.dev/concepts/gqa.md): Several query heads share one key/value head, shrinking the KV cache with little quality loss.
- [Sliding Window Attention (SWA)](https://llm-atlas-7or.pages.dev/concepts/swa.md): Some layers only attend to a local window of recent tokens instead of the whole context.

## Benchmark (Artificial Analysis Intelligence Index)

- AA Intelligence Index v4.3.2: total 9.4 (Scientific 3.2)

## Links

- Architecture diagram: https://sebastianraschka.com/llm-architecture-gallery/images/architectures/gemma-4-12b.webp
- config.json: https://huggingface.co/google/gemma-4-12B-it/blob/main/config.json
- Tech report: https://developers.googleblog.com/gemma-4-12b-the-developer-guide/
- Source card (source of truth): https://sebastianraschka.com/llm-architecture-gallery/#card-gemma-4-12b
- Web page: https://llm-atlas-7or.pages.dev/models/gemma-4-12b/
- JSON: https://llm-atlas-7or.pages.dev/api/models/gemma-4-12b.json

_Data from Sebastian Raschka's LLM Architecture Gallery (https://sebastianraschka.com/llm-architecture-gallery/). Synced 2026-11-04._
