Gemma 4 Technical Report: How an Open Model Fights Bigger Ones With "Small Params + Thinking + Lean Memory"

Google DeepMind's Gemma 4 report isn't a feature list. What it really wants to prove is: you don't need a trillion-param MoE to close in on human preference and STEM — while still fitting on-device.
By arXiv / Google DeepMind07-09 · 12 min read⚑ Research paper
🎧 Listen to the podcast0:00 / --:--
0:00 / --:--
Research Explainer · XiaoHu Explains
⬡ Report Core (read this first)

Gemma 4's throughline is one sentence: use three engineering tracks to push "capability" and "cost" in the favorable direction at the same time.

Track one lifts intelligence: thinking mode (reason first, then answer). Track two cuts cost: local/global attention ratio, p-RoPE, KV sharing, K=V, QAT quantization, MTP speculative decoding. Track three expands modality: native image/text/audio, plus a "no separate encoder" unified architecture for the 12B. Every model size, table, and Arena rank below is evidence for this one sentence.

01 Lift Intelligence

Thinking Mode

The main engine behind big math/code/STEM gains; almost every default eval has it on.

02 Cut Cost

Long Context + Quantization + Speculative Decoding

KV can't blow up as context grows; 31B goes from ~64GB down to ~19GB; decoding speeds up too.

03 Expand Modality

Native Multimodal + Unified 12B

Most sizes use a frozen encoder; the 12B ingests image patches and audio slices directly — two fewer big weight blobs.

60-Second Overview
  • Family: E2B (effective 2.3B), E4B (effective 4.5B), 12B, 26B-A4B MoE (~4B active), 31B dense. Apache 2.0.
  • Arena Text (2026-06-19): 31B Elo 1451 — reportedly #1 open dense model; the higher ranks nearby are mostly hundred-B-to-trillion-scale MoEs.
  • Vs. Gemma 3 27B: STEM/code gaps are huge, but in the tables 4th-gen defaults to thinking while 3rd-gen 27B is mostly non-thinking — this shouldn't be read as a pure architecture win.
  • On-device narrative: E2B closes in on 27B-class capability on several fronts (per official framing); audio encoder disk footprint goes from 390MB to 87MB.
⚑ Compiled from arXiv:2607.02770, "Gemma 4 Technical Report." All numbers are self-reported by the vendor. This page's interactivity explains the mechanisms — it doesn't replace the tables in the original PDF.
01

Which Question in the Open-Source Race Is This Answering

By 2026 the open leaderboards were often dominated by giant MoEs. Gemma 4 picked a different lane: dense small-to-mid size + thinking + deployment-friendly.

If you only remember "another 31B just shipped" from this report, you'll miss what it's actually contesting. At the time, the top of Arena was crowded with open models at 300B, 700B, 1T, even 1.6T total params — mostly MoEs. Gemma rewrote the story as:

ProblemBig models are strong, but local/private enterprise deployments can't fit or run them
→
Old open-source answerKeep piling on total params, or accept being clearly a tier behind
→
Gemma 4's answerThinking lifts scores + architecture cuts KV/weights + full coverage from edge to cloud

So the report's "core evidence" isn't a single SOTA point — it's a combination: the dense 31B holding its own against bigger MoEs (human preference); small models still fitting on-device (memory table + audio encoder size); long context without brute-forcing KV (RULER / LOFT).

HOW THE THREE LINES LOCK Thinking Mode AIME / Code / GPQA Lifts reasoning & problem-solving Efficiency Stack KV / QAT / MTP Cuts memory & latency Native Multimodal Image + Audio + Unified 12B Expands what it can ingest Result: small sizes can still compete on human preference + STEM + long context
The three tracks aren't a parallel ad slate: thinking is on the hook for scores, efficiency is on the hook for fitting and running, multimodality is on the hook for what kinds of input it can take. Miss one, and the story falls apart.
02

Pick a Size First, See Who It Was Designed to Be

Click the five model tabs below. Same family, very different jobs.

E2B: On-Device Entry Point, Effective ~2.3B

Uses per-layer embeddings (same lineage as Gemma 3n) — total params are larger, but the "effective" count is 2.3B. Ships with its own 150M vision + 305M audio encoder. The report compares it to Gemma 3 27B, arguing "roughly an order of magnitude fewer params, close on many fronts."

0.8 GBQuantized weight size (32k text, Table 3)
4:1Local/global attention ratio (leaner than the family's usual 5:1)
AIME 37.5Still far above G3 27B's 20.8 (though thinking settings differ between the two)
76MMTP draft head, purpose-built for speculative decoding

E4B: On-Device Workhorse, Effective ~4.5B

Same playbook — small encoders + aggressive quantization. On vision evals, the report writes that it's not below Gemma 3 27B on any listed item (e.g. MMMU Pro 52.6 vs 49.7, MATH-Vision 59.5 vs 46.0). Long context is already ahead of 27B on several fronts too.

2.3 GBQuantized weight size (Table 3)
128k RULER 86.6G3 27B on the same item: 66.0
Audio 87MBQuantized encoder on disk, vs. 390MB for 3n
CoVoST +10%Relative translation improvement over same-tier 3n (official)

12B: the Report's Architecture Experiment (Also a Real Shipping Model)

This is the most "research-flavored" part of the whole report: trained from scratch with no separate vision/audio encoder. Images go through one big matmul on 48×48×3 patches (~35M params) + 2D coordinate positions; audio is projected directly at 40ms/640-dim chunks. The point isn't showmanship — it's cutting the memory fragmentation and pipeline complexity that separate encoders bring.

No 550M ViTAlso no 305M USM audio encoder
7.65 GBQ4_0-scale (Table 3)
MMMU Pro 69.1Between E4B and 26B
Audio scores intactTable 8 shows ASR/translation still works without a dedicated encoder

26B-A4B: the Sparse Route, ~4B Active

A 26B-class total-param MoE with ~3.8–4B active. Arena Elo 1438 — mostly close to the 31B on static benchmarks, but drops more noticeably on agent/terminal-style tasks (Terminal Bench, some Tau2 splits). Good fit if you want "small active, big capacity" deployment rather than a pure dense inference stack.

2.8B activeTable 1's einsum notation: 24.5B total / 2.8B active
Elo 1438Arena, upper-mid pack among open MoEs
550M visionHas a vision encoder, no audio encoder column
HLE 8.7The 31B scores 19.5 — the flagship is still clearly stronger

31B: Dense Flagship, the Report's "Headline" Slot

This is the one holding the #1 open-dense Arena spot; AIME 89.2, LiveCodeBench 80, GPQA 84.3, Codeforces Elo 2150. It also gets QAT and MTP on the efficiency side. It's not "just another 30B" — it's Gemma's proof point that a dense mid-size model can still go toe-to-toe with giant open MoEs in 2026.

Elo 1451≈ DeepSeek V4 Pro Thinking's 1458, an order of magnitude fewer params
19.2 GBQ4_0; ~64GB in bf16
128k RULER 96.4Long context nearly maxed out
HLE 19.526.5 with search; not reported at smaller sizes
03

Core Mechanism One: Why Thinking Mode Rewrites the Scores

Skip this section and every "crushes Gemma 3 27B" table later will be misread.

Gemma 4's instruction models can write out a reasoning trace in a dedicated channel before the final answer. Put <|think|> in the system turn and it switches on. Formatting-wise, the pretraining end token is <eos>, the instruction model's is <turn|>; thinking content runs through <|channel>thought ...<channel|>.

What a Full Call Looks Like

1

System turn switches on thinking + optional tool declarations

E.g. declaring a function like search_train — the model only knows what it can call if this is declared.

2

User asks a question

Plain natural language, same as any other instruction model.

3

Model writes the thought channel first

Internal reasoning, breaking down the problem, checking constraints — the final answer the user sees comes after the thought.

4

Issues a tool_call when needed, then continues

The appendix's ticket-booking example: ask for the destination first, then call the fare-lookup function.

Same Weights, Thinking Converts "Latent Potential" Into Visible Score

The report doesn't give a full ablation table for "thinking off vs. on," but the task type tells the story: the more a task needs multi-step reasoning, the bigger the gap between 4th-gen and 3rd-gen's 27B.

AIME 2026 · 31B thinking89.2
AIME · G3 27B non-thinking20.8
LiveCodeBench · 31B80.0
LiveCodeBench · G3 27B29.1
IFEval (instruction following, weakly reasoning-dependent) · 31B98.9
IFEval · G3 27B90.4

The "does it follow instructions" gap on IFEval is relatively mild; the "does it need many steps of thought" gap on AIME/code is extreme. This suggests thinking mode is very likely a score engine, not just icing.

The Filter You Must Apply When Reading Table 5

Setting reminder:The Gemma 4 column defaults to thinking; the Gemma 3 27B header says non-thinking. Calling 89.2 vs. 20.8 a straight "one generation of architecture progress" over-reads it. A steadier read: gen 4 = new architecture + new post-training + thinking mode, bundled together — thinking's individual contribution is unknown.

Also, Arena is human blind-preference voting; static benchmarks are reproducible scores — the two leaderboards can't be converted into each other. Beyond the vendor's self-reported numbers, third-party reproductions will shift over time.

04

Core Mechanism Two: How Long Context Gets "Cheaper"

Click through the four steps to see how global KV gets cut by up to 37.5%.

As context grows, the KV cache during inference scales linearly with sequence length and quickly becomes the memory bill itself. Gemma 4 didn't invent "infinite-context magic" — it split attention into "most layers only look nearby + a few layers look globally," then squeezed the cache specifically on those global layers.

All-Global Attention: Every Token Has to Talk to All History

The longer the sequence, the more every layer has to store the full K/V. As you go from 32k to 128k to 256k, the memory curve gets steep fast. On-device and single-GPU deployments die here first — not from "how big the parameter file is," but from this.

Analogy

Like a meeting where every sentence anyone says has to be broadcast to the entire room, and the whole thing has to be recorded and archived. Once the room gets big enough, the recording drive fills up first.

Local Sliding Window : Global = 5:1 (4:1 for E2B)

Carries over the Gemma 3 approach: most layers only do local attention (looking at a recent window), with a true global attention layer inserted every so often. Compute and cache overhead get diluted proportionally.

Positional encoding is also split: global layers use p-RoPE (p=0.25), local layers use plain RoPE; frequencies are 1M and 10k respectively. The idea: global layers need to handle long-range positional relationships, local layers handle short-range structure.

Three Cuts, All Aimed at Global-Layer KV

K = V (Global Layers)

Outside E2B/E4B, global-layer values reuse the keys directly, saving a whole separate V store.

KV Sharing

Ratios like 20/35 for E2B, 18/42 for E4B — layers share caches instead of each holding its own full set.

p-RoPE

Paired with the global-layer positional scheme, further compresses the shape of the global cache; the report sums this up as up to −37.5% global KV.

Stacked With QAT

The weights themselves shrink too: 31B goes 64→19.2GB; on-device E2B drops to ~0.8GB. The context bill and the weight bill get cut together.

Cache Got Cheaper — Did Long-Context Scores Collapse?

ItemContext31BE4BG3 27B
RULER accuracy128k96.486.666.0
LOFT text retrieval128k79.558.58.6
GraphWalks F1<128k82.350.932.8
MRCR 8-needle128k66.425.413.5

Table 9, etc., are non-thinking. The report's read: long context is a full generation ahead of gen 3; E4B already beats 27B on several items. The 31B also reports a full-book MTOB at ~256k.

05

Core Mechanism Three: Two Multimodal Routes, Why the 12B Gets Its Own Chapter

Toggle between: the "encoder route" most sizes take vs. the 12B's "no-encoder route."

Translator + Main Brain

E2B/E4B use a 150M ViT + 305M USM-family audio encoder; the bigger dense/MoE models use a 550M vision encoder. During pretraining the encoders are frozen, and the main model learns to read whatever continuous representations they output.

Img

Variable aspect ratio → 16px patches → soft tokens

N_max can go up to 70 / 140 / 280 / 560 / 1120. Higher resolution eats more sequence length; Appendix Table 12 shows scores drop at lower resolution.

Audio

40ms Mel → Conformer → continuous vector

Vs. Gemma 3n: 680M → 305M params, on-disk quantized footprint 390 → 87MB, and it reports ~10–17% relative gains on transcription/translation.

This route is engineering-mature: the encoder can be quantized and optimized independently, while the main model focuses on language. The tradeoff is memory fragmentation and the deployment complexity of "three sets of weights."

The Main Brain Looks at Raw Material Directly

The 12B is trained from scratch: image patches go through one matmul (~35M params) + 2D coordinate positional encoding; audio at 16kHz is sliced into 40ms chunks, yielding 640-dim vectors, and projected straight into the LLM embedding space. No separate ViT/USM.

What It's Betting On

If the language model is large enough and the pretraining recipe is right, "light projection + lots of data" can replace "heavy encoder." Table 8's ASR/translation numbers are the report's proof: at least for supported languages, this route isn't just a toy.

That's why the 12B's audio/vision encoder columns in the parameter table are blank, yet it still shows up in multimodal evals. It's both an architecture probe inside the product line and a reproducible experiment point for the community.

06

Efficiency Not Yet Covered: the Draft Head and Quantization

Long context solves "storage" — decoding speed still needs "fast." Gemma 4 ships with an autoregressive MTP draft head: it takes the main model's last-layer activations and KV, and a 4-layer small Transformer cross-attends to the main model's cache to draft future tokens in sequence, for use in speculative decoding. Because it cross-attends to KV the main model already has, it doesn't need a separate MTP prefill, and the draft length can vary.

The on-device draft head also shrinks "project onto a 262k-token vocab" into "top-k on clusters first, then project" — cutting the final matrix from d×262000 down to d×4096, with a claimed acceptance rate close to the original. QAT constrains the weights to int2/int4+int8 or Q4_0 during training itself, avoiding the big accuracy drop that comes from "quantize after training."

−37.5%
Global KV cache size, the report's stated upper bound
64→19.2
31B text weights, GB (bf16 → Q4_0)
d×4096
On-device MTP's final projection width (after vocab clustering)
44%
On-device latency reduction for the 150M vision encoder (W8A8) vs. 3n
07

Evidence Layer: Human Preference vs. Static Benchmarks

Two bodies of evidence answer two different questions. Toggle to switch.

Who Do People Actually Prefer (2026-06-19 snapshot)

Smaller scale → Higher Elo ↑
Fable 5 1508
1T-class MoE ~1460
Gemma4 31B 1451
26B-A4B 1438
Gemma3 27B 1366

The x-axis is a "scale intuition" sketch, not a strict log scale. The takeaway: the dense 31B has muscled into the Elo band of giant MoEs, while sitting far above its own predecessor, the 27B.

RankModelEloType
1Claude Fable 51508Closed-source benchmark
36DeepSeek V4 Pro Thinking1458MoE 1.6T/49B
43Gemma 4 31B1451Dense 31B
61Gemma 4 26B-A4B1438MoE 26B/4B
157Gemma 3 27B1366Dense 27B

Where It's Strong and Weak on Benchmarks

MMLU Pro · 31B85.2
GPQA Diamond · 31B84.3
HLE · 31B / with search19.5 / 26.5

On knowledge and hard-question sets, the 31B/26B clearly pull ahead of E2B/E4B. E2B's GPQA score of 43.4 already sits close to G3 27B's 42.4 — right in line with the "small model closes in on big model" narrative.

LiveCodeBench v6 · 31B80.0
Codeforces Elo · 31B2150
Same items · G3 27B29.1 / 110

Code is one of the areas with the biggest visual jump from gen 3 to gen 4. Combined with thinking mode, it looks more like "trading reasoning budget for accuracy" than simply piling on more code corpus.

Task31B26B-A4BE2BG3 27B
Terminal Bench Hard36.014.03.04.0
Tau2 retail86.485.534.66.6
Tau2 telecom69.343.019.73.1

On agent/tool-use tasks, 31B and 26B diverge: they're close on retail-style scenarios, but the 31B is clearly steadier on telecom and terminal tasks. In other words, "close on Arena" doesn't mean "interchangeable on every agent task."

Bringing the Evidence Back to the Core

Arena proves: the dense 31B can muscle into the human-preference band of giant open MoEs.

The static benchmark suite proves: thinking + new post-training push the STEM/code ceiling into a different tier.

The long-context and quantization tables prove: this isn't a "lab-only, doesn't care about deployment" model card — the efficiency stack is a first-class citizen.

08

Training and Safety: What the Report Says — and What It Deliberately Doesn't

Pretraining data cuts off at 2025-01, covering web, code, and images; E2B/E4B/12B also include audio. Filtered for contamination, unsafe content, and memorization risk. Post-training follows the Gemma 3 framework plus thinking; the data side strips PII/toxicity/incorrect self-identity/duplicates, and adds attribution, hedging, and refusal subsets.

On safety, the report states it follows Gemini-tier processes, checks against the Frontier Safety Framework, tests inherent behavior under no filtering conditions, and shows improvement across safety categories relative to the prior generation with a low unwarranted-refusal rate. The report does not publish a full safety breakdown table, nor total training token counts, detailed data mixture ratios, or a systematic ablation of thinking mode. Read it as an "architecture and results whitepaper," not a "fully reproducible recipe book."

Training Infrastructure (secondary, but explains "why they dared ship this architecture")

TPU v5p/v6e, three-way sharding across data/sequence/replica; ZeRO-3; Pathways multi-pod. Slice-Granularity Elasticity brings failure recovery from "many minutes" down to "a few seconds." None of this changes the model definition, but it explains how they could push both the encoder route and the no-encoder route simultaneously across the whole size lineup.

09

The Framework You Should Walk Away With

If you're building for local/on-device

Prioritize E2B/E4B: effective small param count + QAT + smaller audio encoder + 4:1/5:1 attention. Don't just look at "total params" marketing names.

If you're doing single-machine dense inference

31B is the main piece of evidence. Arena and STEM/code both check out at once — but also verify your own quantization backend can actually handle Q4_0 and the MTP draft head.

If you research multimodal architecture

The encoder-free 12B is the chapter genuinely worth digging into: it's asking whether a heavy encoder is still mandatory.

If you're benchmarking against other open-source players

Align first: thinking on or off, same-day Arena snapshot, dense vs. MoE, context length, and KV implementation. Tables with mismatched settings can differ by 20 points and still mean nothing.

Full key-table number lookup (expand)

Table 5 excerpt (thinking) 31B: MMLU Pro 85.2 / AIME 89.2 / LCB 80 / CF 2150 / GPQA 84.3 / IFEval 98.9 / MRCR 66.4 / Terminal 36 / Tau2 retail 86.4

Vision Table 6 (high resolution) 31B: MMMU Pro 76.9 / MATH-Vision 85.6 / InfographicVQA 92.0 / OmniDocBench 0.131↓

Memory Table 3 E2B 4.6→0.8; E4B 9.0→2.3; 12B 24→7.65; 26B-A4B 52/7.6→16.2/2.8; 31B 64→19.2 (GB, 32k text)

Vocabulary 262k; same tokenizer family as Gemini Team 2025.

Source: Gemma Team, Google DeepMind. "Gemma 4 Technical Report." arXiv:2607.02770v1. This page is a mechanism-focused explainer; all interactivity is pure CSS. For exact figures, defer to the original PDF. The previous version leaned on lists and tables; this version was rewritten around "one core sentence + three mechanisms deep-dived + two-sided evidence."

Source
arXiv / Google DeepMindarXiv / Google DeepMind·Read the source
↑ End of article
✓ This article is free to read in full

Members can copy or download the full Markdown, and let their AI subscribe and ask.

Read the original ↗
📮 New explainers, straight to your inbox

Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.