Gemma 4 landed on 31 March 2026 and was announced by Google on 2 April. Since then the family has grown again — the Gemma 4 12B "Unified" model arrived on 3 June 2026, making the lineup five models, not the four most comparison articles still list.
This page is the version-to-version diff: what changed, what the numbers actually say, what hardware you need, and the honest cases where staying on Gemma 3 is still correct. For general background on the family, see our Gemma 4 complete developer guide.
What is the difference between Gemma 4 and Gemma 3?
The short version: Gemma 3 was a solid open-weight family with a restrictive custom licence and text-plus-image inputs. Gemma 4 is built from the same research lineage as Gemini 3, ships under a standard open-source licence, adds audio and video on several sizes, and introduces Google's first Gemma Mixture-of-Experts model.
| Attribute | Gemma 3 | Gemma 4 |
|---|---|---|
| Released | 12 March 2025 (270M added Aug 2025) | 31 March 2026 (12B added 3 June 2026) |
| Sizes | 270M, 1B, 4B, 12B, 27B | E2B, E4B, 12B, 26B A4B, 31B |
| Architecture | Dense only, decoder-only transformer | Dense + one MoE (26B A4B) |
| Context window | 32K (270M, 1B) / 128K (4B, 12B, 27B) | 128K (E2B, E4B) / 256K (12B, 26B, 31B) |
| Input modalities | Text + image (4B and above) | Text + image all sizes; audio + video on E2B, E4B, 12B |
| Thinking mode | No | Yes — configurable token budget |
| Languages | 140+ | 35+ out of the box, pre-trained on 140+ |
| Tokenizer vocab | 262K | 262K (chat template changed) |
| Licence | Gemma Terms of Use (source-available) | Apache 2.0 (OSI-approved) |
| LMArena Elo (top model) | 1365 (27B) | 1452 (31B) — #3 open, #27 overall |
What sizes does Gemma 4 come in?
Gemma 4 abandoned Gemma 3's straightforward parameter-count naming. The "E" in E2B and E4B stands for effective parameters — these models use Per-Layer Embeddings so the memory footprint at inference behaves like a smaller model than the raw weight count suggests. The "A4B" in 26B A4B means 4B active: it loads 25.2B total parameters but routes only about 3.8B through each token.
| Model | Parameters | Context | Inputs | Closest Gemma 3 equivalent |
|---|---|---|---|---|
| Gemma 4 E2B | 2.3B effective | 128K | Text, image, audio | Gemma 3 1B |
| Gemma 4 E4B | 4.5B effective | 128K | Text, image, audio | Gemma 3 4B |
| Gemma 4 12B Unified | 11.95B dense | 256K | Text, image, audio, video | Gemma 3 12B |
| Gemma 4 26B A4B | 25.2B total / 3.8B active | 256K | Text, image | — (no equivalent) |
| Gemma 4 31B | 30.7B dense | 256K | Text, image | Gemma 3 27B |
One gap worth flagging: Gemma 3 had a 270M model for ultra-constrained deployments. Gemma 4 has no direct replacement at that scale — E2B is the floor. If you built on Gemma 3 270M, you are staying there for now.
What actually changed in Gemma 4?
The licence changed, and it matters more than the benchmarks
Gemma 1 through 3 shipped under the custom "Gemma Terms of Use" — source-available, not open source. It carried use restrictions that were reasonable in spirit but legally ambiguous, and enterprise legal teams routinely flagged them as a deployment blocker, particularly around whether fine-tuned derivatives could be commercialised freely.
Gemma 4 is the first Gemma release under the OSI-approved Apache 2.0 licence. No custom carve-outs, no separate agreement with Google, no royalties or revenue share. If a licence review stalled your Gemma 3 rollout, that objection is gone. Note that this is not retroactive — Gemma 3 weights remain under the old terms.
A Mixture-of-Experts model, for the first time
The 26B A4B is the interesting engineering story. It uses 128 total experts with 8 active plus 1 shared, loading 25.2B parameters but computing with roughly 3.8B per token. In practice you get scores within a couple of points of the 31B dense model at meaningfully faster inference — while still needing enough VRAM to hold all the weights, which is the trade-off people usually miss.
Multimodality went from bolted-on to native
Gemma 3 accepted images from 4B upward, normalised to 896×896 and encoded as 256 tokens each. Gemma 4 accepts image input across the whole family and adds native audio on E2B, E4B and 12B. The 12B "Unified" model goes furthest: it is encoder-free, processing text, images, audio and video through a single decoder-only transformer rather than routing through separate vision and audio encoders.
Attention, context and thinking mode
Gemma 4 uses a hybrid attention scheme interleaving local sliding-window attention with full global attention — the E4B, for example, runs 42 layers with a 512-token sliding window. That is what makes 256K context affordable on the larger models. Gemma 4 also adds a configurable thinking mode with a token budget you control, which Gemma 3 had no equivalent for.
How do Gemma 4 and Gemma 3 compare on benchmarks?
Comparing the flagships — Gemma 3 27B against Gemma 4 31B — the gap is not incremental. It is the largest generational jump in Gemma's history.
| Benchmark | Gemma 3 27B | Gemma 4 26B A4B | Gemma 4 31B |
|---|---|---|---|
| MMLU-Pro | 67.5% | 82.6% | 85.2% |
| GPQA Diamond | 42.4% | 82.3% | 84.3% |
| LiveCodeBench | 29.7% | 77.1% (v6) | 80.0% (v6) |
| AIME 2026 (no tools) | — | 88.3% | 89.2% |
| LMArena Elo | 1365 | — | 1452 |
GPQA Diamond roughly doubles and LiveCodeBench nearly triples. On LMArena the 31B gained 87 Elo points over the 27B, putting it at #3 among open models and #27 overall — competitive with models many times its size.
Two honest caveats. First, the LiveCodeBench figures use different harness versions across generations, so treat that row as directional rather than exact. Second, Gemma 3 predates AIME 2026, so there is no like-for-like number. The mid-tier holds up too: the Gemma 4 12B scores 77.2% MMLU-Pro and 78.8% GPQA Diamond — comfortably above the old 27B flagship at less than half the size.
How much VRAM do you need to run Gemma 4 vs Gemma 3?
This is the question that actually decides most migrations. Figures below are for Gemma 4 at common quantisations.
| Model | 4-bit | 8-bit | BF16 | Runs on |
|---|---|---|---|---|
| Gemma 4 E2B | 4 GB | 5–8 GB | 10 GB | Any modern laptop, CPU-only viable |
| Gemma 4 E4B | 5.5–6 GB | 9–12 GB | 16 GB | 8 GB GPU, base Apple Silicon |
| Gemma 4 12B | 7–8 GB | 13–14 GB | 25 GB | 16 GB laptop / RTX 4060 Ti |
| Gemma 4 26B A4B | 16–18 GB | 28–30 GB | 52 GB | 24 GB card (RTX 3090/4090) |
| Gemma 4 31B | 17–20 GB | 34–38 GB | 62 GB | 24 GB card at 4-bit |
The practical headline: a 24 GB GPU runs the 26B A4B at 4-bit with the full 256K context, and it outperforms Gemma 3 27B on every reported benchmark. If you were running Gemma 3 12B only because the 27B would not fit, test the 26B A4B — it will likely fit and it will beat both.
Ollama defaults to Q4_K_M for Gemma 4, which is the right starting point on consumer hardware. Google's recommended sampling settings are temperature 1.0, top_p 0.95, top_k 64. For step-by-step local setup see our guides on running Gemma 4 with Ollama and running Gemma 4 locally on your PC.
What do you need to change in your code?
Three things break if you swap the model string and nothing else:
- The chat template. Gemma 3 used a custom format with
<start_of_turn>markers and no true system role. Gemma 4 uses a standard system/user/assistant structure. If you hand-rolled prompt strings rather than using the tokenizer'sapply_chat_template(), this is where you will silently degrade output quality. - The tokenizer. Both generations use a 262K vocabulary, but you must load the Gemma 4 tokenizer — reusing a cached Gemma 3 tokenizer produces subtly wrong special tokens.
- Thinking-mode budgets. Gemma 4 can emit reasoning tokens before its answer. If your parser assumes the first token is the response, set an explicit thinking budget or disable it.
Existing Gemma 3 LoRA adapters and fine-tunes do not transfer. Different architecture, different layer counts, different naming — you retrain.
Should you upgrade from Gemma 3 to Gemma 4?
A decision rule rather than a recommendation:
- Upgrade if you run Gemma 3 27B. The 26B A4B beats it on every benchmark at similar or lower VRAM, and the 31B beats it decisively. There is no argument for staying.
- Upgrade if a licence review blocked you. Apache 2.0 removes the Gemma Terms of Use ambiguity entirely.
- Upgrade if you need long context or audio. 256K versus 128K, plus native audio on three of the five sizes.
- Stay on Gemma 3 if you have production fine-tunes. Adapters do not port. If your tuned Gemma 3 4B already hits your quality bar, the retraining cost may not be worth it this quarter.
- Stay on Gemma 3 270M if you are at the extreme edge. Gemma 4 has no model that small.
- Stay if your pipeline is tightly coupled to the old chat template and you have no bandwidth to revalidate prompts — but schedule the migration, do not cancel it.
For everyone else, Gemma 4 is the default. The generational gap is large enough that continuing to build new work on Gemma 3 in late 2026 is hard to justify.
How does Gemma 4 compare to Qwen 3.5?
The other question people ask alongside the version diff. Both families are Apache 2.0, both run on Ollama, but they make different bets.
Qwen 3.5 ships a far wider size ladder — 0.8B through 27B dense, plus 35B-A3B, 122B-A10B and a 397B-A17B MoE flagship — with 262K native context and 200+ language coverage. Gemma 4 tops out at 31B dense. If you need frontier-class capability and can serve a large MoE, Gemma has no answer to Qwen's flagship.
Where Gemma 4 wins is the single-consumer-GPU tier: it is the more capable model per gigabyte of VRAM, and it is the only one of the two with native audio input. Qwen tends to lead on agentic software-engineering work and multilingual breadth; Gemma leads on math and the widest multimodal envelope. At the 27–31B tier the two trade blows depending on benchmark, so pick on modality and language needs rather than leaderboard position.
Worth knowing as of August 2026: Qwen has since moved on twice, to 3.6 and then 3.8, while Gemma 4 remains current. Our Gemma 4 vs Qwen 3.5 comparison covers that matchup tier by tier, and the open-source LLM landscape guide puts both families in context against Llama 4 and DeepSeek.
FAQ
Is Gemma 4 better than Gemma 3?
Yes, substantially. Gemma 4 31B scores 85.2% on MMLU-Pro against Gemma 3 27B's 67.5%, and 84.3% on GPQA Diamond against 42.4%. On LMArena it gained 87 Elo points over the previous flagship. It also adds a permissive Apache 2.0 licence, 256K context, and native audio on the smaller sizes. The only areas Gemma 3 still wins are the 270M size tier and existing fine-tunes.
What sizes does Gemma 4 come in?
Five: E2B (2.3B effective), E4B (4.5B effective), 12B Unified (11.95B dense), 26B A4B (25.2B total, 3.8B active Mixture-of-Experts), and 31B (30.7B dense). The first four shipped on 31 March 2026; the 12B Unified was added on 3 June 2026. The "E" means effective parameters and the "A4B" means roughly 4B active parameters per token.
How much VRAM do I need to run Gemma 4?
At 4-bit quantisation: about 4 GB for E2B, 5.5–6 GB for E4B, 7–8 GB for the 12B, 16–18 GB for the 26B A4B, and 17–20 GB for the 31B. A 24 GB card such as an RTX 3090 or 4090 runs the 26B A4B at full 256K context. The 12B fits comfortably on a 16 GB laptop or Apple Silicon machine with unified memory.
Is Gemma 4 free for commercial use?
Yes. Gemma 4 is the first Gemma release under the OSI-approved Apache 2.0 licence, permitting commercial use, modification and redistribution with no royalties, revenue share or separate agreement with Google. This replaced the custom Gemma Terms of Use that governed Gemma 1 through 3. The change is not retroactive — Gemma 3 weights remain under the older, more restrictive terms.
Should I upgrade from Gemma 3 to Gemma 4?
Upgrade if you run Gemma 3 27B, need context beyond 128K, need audio input, or were blocked by the old licence. Hold if you have production LoRA adapters or fine-tunes on Gemma 3, since they do not transfer and must be retrained, or if you depend on the 270M size that Gemma 4 does not offer. Budget time for chat-template and tokenizer changes either way.
Gemma 4 vs Qwen 3.5 — which is better?
Qwen 3.5 has the higher ceiling thanks to its 397B-A17B MoE flagship and broader 200+ language coverage, and it generally leads on agentic coding work. Gemma 4 is the better choice when you are limited to one consumer GPU, need native audio input, or want the strongest multimodal envelope per gigabyte of VRAM. At the 27–31B tier they trade blows by benchmark.
Is Gemma 4 a drop-in replacement for Gemma 3?
No. The chat template changed from Gemma 3's custom format to a standard system/user/assistant structure, you must load the Gemma 4 tokenizer rather than reusing a cached Gemma 3 one, and thinking mode can emit reasoning tokens before the answer. Use the tokenizer's apply_chat_template() rather than hand-built prompt strings and most of the breakage disappears.
Does Gemma 4 support images and audio?
All five Gemma 4 models accept text and image input. Native audio input is available on E2B, E4B and the 12B Unified model. The 12B goes furthest — it is encoder-free, handling text, images, audio and video through a single decoder-only transformer rather than separate vision and audio encoders. Gemma 3 accepted images only, and only from 4B upward.
The bottom line
Gemma 4 is not an incremental refresh — it is a new family with a new naming scheme, a new licence, a new architecture tier, and roughly double the reasoning performance. If you are on Gemma 3 27B, migrate. If you are running a fine-tuned smaller Gemma 3 that already meets your quality bar, plan the move rather than rushing it, because the retraining is real work.
The single most useful thing you can do before committing is benchmark the 26B A4B on your own workload at 4-bit. It is the model that changes the hardware maths most for people already running a 24 GB card, and it is the one that makes the 27B genuinely obsolete.