Model datasheet · Gemma 4
Gemma 4 12B
The 'Unified' one: an encoder-free architecture that takes image and audio straight into the embedding space, at a size that leaves room to breathe on a 16GB machine. Punches near the 26B MoE on reasoning while being the only model here that hears.
- Vendor
- Architecture
- Dense · 11.95B
- Context
- 262,144 tokens
- License
- Apache-2.0
- Released
- 2026-06-03
- Vision
- Yes
→ GGUF (llama.cpp / LM Studio / Ollama) → MLX (Apple Silicon)
Architecture, from its own config.json
48 layers · 40 sliding window · 8 full attention
16 attention heads over 8 KV heads (GQA 2:1), head dim 256 — its full-attention layers use a different shape again, 1 KV head of 512, which is the shape that decides the cache at long context · dense feed-forward · vocabulary 262,144
Where the memory goes: weights by band above, plus a KV cache of 608MB at 8K · 992MB at 32K · 2.5GB at 128K, plus the runtime's own working memory — dominated by the output projection over that vocabulary.
Inside one layer, from its own tensors
40 × sliding-window layer
8 × full-attention layer
The green line down the right of each half is the residual: it leaves the spine above the norm, skips the operation entirely and rejoins at the +. Where attention is drawn open, q, k and v are scaled to their real output widths — a model that shares key and value heads across many query heads shows one wide box beside two narrow ones.
Around the stack: an embedding of 262,144 × 3,840, a final norm, and an output projection that reuses the embedding (tied weights).
Also in every block and not drawn, because their tensor names do not fix where they belong: layer_scalar. Guessing an order is the one thing this diagram will not do.
§1 Characteristics by quantization band
— Not yet rated · contributions welcome —
Q4–Q5 — 4–5 bit
7GB weights · e.g. Q4_0 , Q4_K_M , mlx-4bit + KV: 608MB at 8K · 992MB at 32K · 2.5GB at 128Kdata checked Aug 2026
- quant-degradation-community — community consensus @ Q4_0 · aggregated · 2026-08-30
Editorial derivation: QAT Q4_0 is the intended local build; one point for quant loss, consistent with the family.
data checked Aug 2026
- quant-degradation-community — community consensus @ Q4_0 · aggregated · 2026-08-30
Editorial derivation: QAT limits quant loss.
data checked Aug 2026
- quant-degradation-community — community consensus @ Q4_0 · aggregated · 2026-08-30
Editorial derivation: carried from the full band.
— Not yet rated · contributions welcome —
FP16 — full precision (fp16/bf16)
24GB weights · e.g. bf16 + KV: 608MB at 8K · 992MB at 32K · 2.5GB at 128Kdata checked Aug 2026
- vendor-model-card — AIME 2026 (no tools) = 77.5 @ bf16 · vendor-reported · 2026-08-30
GPQA Diamond: 78.8, MMLU-Pro: 77.2. A 12B scoring 77.5 on AIME 2026 is the headline of this release.
data checked Aug 2026
- vendor-model-card — LiveCodeBench v6 = 72 @ bf16 · vendor-reported · 2026-08-30
Vendor-reported; no Aider polyglot entry as of 2026-10-30 (the leaderboard has added no model since 2025-10-03).
data checked Oct 2026
- vendor-model-card — Tau2 average (with tools) = 69 @ bf16 · vendor-reported · 2026-08-30
Essentially level with the 26B-A4B (68.2) at half the footprint.
- vendor-model-card — BFCL-v4 (FC) = 59.68 · aggregated · 2026-10-04
Below Ling-3.0-tiny (62.72) and Qwen3.5-9B (65.83) in the same table, so the outside number is less flattering than Google's Tau2 69.0. Held at 7 because the two benchmarks measure different things and this one is competitor-run; treat 7 as the top of the plausible range. Third-party measurement by inclusionAI, published as an image in the Ling-3.0-tiny model card (column 'Gemma-4-12B-it (Thinking)'). A competitor-run comparison, not Google's number and not a neutral leaderboard; thinking mode, quant not stated (presumed full precision). The -AA rows in the same table are deliberately not recorded.
data checked Aug 2026
- vendor-model-card — MRCR v2 @128K (8 needle) = 43.4 @ bf16 · vendor-reported · 2026-08-30
Same story as the 26B-A4B: a 256K window whose retrieval is already shaky at 128K.
data checked Oct 2026
- eqbench-creative — EQ-Bench Creative Writing v3 rubric score (0–20) = 12.38 · aggregated · 2026-10-30
Independent; row google/gemma-4-12B-it. Rubric rank 93 of 146 (median 13.56); by Elo (1289.5) it ranks 99. Was 15.71 under the old judge. Still the lowest of the three larger Gemma 4 models (26B-A4B 13.17, 31B 13.60). Creative Writing v3 was re-scored on 2026-10-25: the rubric is now judged by GLM 5.3 (via OpenRouter, low reasoning effort) and the pairwise Elo by Claude Opus 5, replacing Claude Sonnet judges, and the board median fell from 15.96 to 13.56. Rubric figures from before that date are not comparable with this one. Quant and mode not stated by EQ-Bench (presumed full-precision API serving). Data file behind https://eqbench.com/creative_writing.html, last modified 2026-10-28.
- eqbench-creative — EQ-Bench Creative Writing Longform score (0–100) = 48.7 · aggregated · 2026-10-04
Rank 95 of 140 on the longform board (median 59.1). Mid-table prose: solid rubric scores, weaker in pairwise comparison and at chapter length.
data checked Oct 2026
- vendor-model-card — IFBench = 73.5 · aggregated · 2026-10-04
Multi-IF 88.44, LIFEBench 65.30 in the same table. First instruction-following evidence for this model. Third-party measurement by inclusionAI, published as an image in the Ling-3.0-tiny model card (column 'Gemma-4-12B-it (Thinking)'). A competitor-run comparison, not Google's number and not a neutral leaderboard; thinking mode, quant not stated (presumed full precision). The -AA rows in the same table are deliberately not recorded.
§2 Known issues & what fixes them
The 12B ships a Multi-Token-Prediction drafter for speculative decoding, and that path has its own bug reports in llama.cpp — enabling it (`-fit on`) can break generation on this size specifically. The speed feature is the risk, not the model.
Run without MTP/speculative decoding until the issue closes, or track a llama.cpp build that has the Gemma4 MTP fix. Plain Q4_0 decoding is unaffected.
Evidence · 2 sources · community-consensus
- Eval bug: Gemma4 MTP (github, 2026-08-30)
- unsloth Gemma 4 12B QAT GGUF — ships the MTP drafter for speculative decoding (other, 2026-08-30)
Shares the family's rocky local-runtime history: Google's refreshed official GGUFs (2026-07-15) failed to load in LM Studio 0.4.19, and the family produces gibberish past ~230 tokens when KV offload (-nkvo) is on.
Take a re-cut community quant and a current llama.cpp; don't run Gemma 4 with -nkvo.
Evidence · 2 sources · community-consensus
- Latest official Google Gemma 4 GGUF models fail to load in LM Studio 0.4.19 (github, 2026-08-30)
- Eval bug: Gemma4 models produce gibberish at some point with -nkvo (github, 2026-08-30)
The 256K window oversells it: retrieval accuracy at 128K is 43.4% (vendor's own MRCR v2 number), essentially the same as the 26B-A4B. Don't stuff the window and expect recall.
Retrieve and paste the relevant chunk rather than the whole corpus.
Evidence · 1 source · anecdotal
- Gemma 4 model card — MRCR v2 @128K per variant (vendor, 2026-08-30)