Gemma 4 comes in five sizes: E2B, E4B, 12B Unified, 26B A4B, and 31B. The letters describe three architectural designs that affect computation, checkpoint size, and VRAM usage. Choosing a variant requires checking the task, quantization format, and available memory together.
Below are the architectures, official benchmarks, and file sizes, followed by measured VRAM usage and a selection guide. To check what fits your card first, use the picker in this post or the VRAM calculator.
File sizes come from byte counts returned by the HuggingFace API; benchmarks come from official model cards. The VRAM section separates measurements on my laptop with an 8 GB GPU from estimates based on the model architecture.
What the letters actually mean
E = effective parameters
The E in E2B and E4B stands for “effective” parameters. Both models use PLE (Per-Layer Embeddings): each decoder layer has its own small embedding table, from which each token retrieves a vector for that layer.
The key point is that these tables are used only for lookups — they never participate in matrix operations. That is why Google publishes two parameter counts: E2B is 2.3B effective / 5.1B with embeddings, and E4B is 4.5B effective / 8B with embeddings. Compute scales with the effective count; storage scales with the full one.
PLE reduces the number of parameters involved in matrix operations, but the tables still need storage. The “size trap” section below shows how quantizing these tables affects checkpoint size.
Unified = no separate encoders
The other Gemma 4 models push images and audio through a dedicated encoder before handing results to the language model. 12B Unified removes those encoders entirely: image patches and audio waveforms are projected straight into the LLM’s embedding space through lightweight linear layers, so every modality flows into a single decoder-only transformer.
The official card describes reduced multimodal latency and simpler whole-model fine-tuning as benefits of this unified architecture. These cross-size benchmarks do not hold parameter count or training fixed, so they do not isolate an encoder-removal benefit or loss of specialized capability.
This also explains why 12B’s multimodal projector file is so much smaller than the rest: other variants ship an mmproj of 0.9 to 1.1 GiB, while 12B’s is 0.17 GiB, because there is no separate encoder to load in the first place.
A4B = only 4B parameters active
26B A4B is this generation’s only MoE model: 25.2B total parameters, but only 3.8B active during inference. Each token routes to 8 of 128 experts, plus 1 shared expert.
The active count is in the 4B class, reducing computation, while the full count determines weight storage. Google describes it as faster than dense 31B and close to 4B speed; routing, memory bandwidth and hardware still affect actual performance. Full GPU residency needs space for all 25.2B parameters. An implementation with expert CPU offload can instead use system RAM, with different transfer and latency costs.
Where did 27B and 32B go
People arriving from Gemma 3 often go looking for 27B — the previous generation’s flagship. Gemma 4 has no 27B, and no 32B either. The official repositories expose exactly five Gemma 4 size identifiers: e2b, e4b, 12b, 26b-a4b, and 31b.
Roughly speaking, the slot that 27B occupied has been split in two directions. For throughput there is 26B A4B — MoE, only 3.8B active, running like a 4B model. For maximum quality there is 31B, dense with 60 layers. The old 1B and 4B sizes were replaced by E2B and E4B, trading architecture complexity via PLE for better parameter efficiency.
So if you are hunting for “Gemma 4 27B”, either you are remembering the previous generation, or what you actually want is one of 26B A4B and 31B.
Architecture side by side
| Property | E2B | E4B | 12B Unified | 26B A4B | 31B |
|---|---|---|---|---|---|
| Total parameters | 2.3B effective 5.1B with embeddings |
4.5B effective 8B with embeddings |
11.95B | 25.2B total 3.8B active |
30.7B |
| Layers | 35 | 42 | 48 | 30 | 60 |
| Sliding window | 512 | 512 | 1024 | 1024 | 1024 |
| Context length | 128K | 128K | 256K | 256K | 256K |
| Vocabulary | 262K | 262K | 262K | 262K | 262K |
| Modalities | Text / image / audio | Text / image / audio | Text / image / audio | Text / image | Text / image |
| Vision encoder | ~150M | ~150M | None (Unified) | ~550M | ~550M |
| Audio encoder | ~300M | ~300M | None (Unified) | Not supported | Not supported |
Two rows deserve to be pulled out on their own.
Audio is supported only on E2B, E4B, and 12B. This gets overlooked constantly: if your use case involves speech transcription or speech translation, 26B and 31B are out regardless of how much VRAM you have. Put differently, “I want audio and I want maximum capability” tops out at 12B Unified, with nothing above it.
Sliding window 512 versus 1024. The E-series combines local attention and cross-layer KV sharing; allocation depends on the actual cached layers and each head dimension. The original “8K to 128K adds about 1.1 GB of KV” statement mixed mmproj conditions: the table’s 8K point has no mmproj, while 32K and above include it. Retain the total-memory readings, but they do not isolate KV growth or establish a growth ratio against other models.
Official benchmarks
These figures come from the official model card and cover instruction-tuned variants. The last column is the previous generation’s Gemma 3 27B with thinking disabled, for reference.
| Benchmark | 31B | 26B A4B | 12B Unified | E4B | E2B | Gemma 3 27B |
|---|---|---|---|---|---|---|
| MMLU Pro | 85.2% | 82.6% | 77.2% | 69.4% | 60.0% | 67.6% |
| AIME 2026 (no tools) | 89.2% | 88.3% | 77.5% | 42.5% | 37.5% | 20.8% |
| LiveCodeBench v6 | 80.0% | 77.1% | 72.0% | 52.0% | 44.0% | 29.1% |
| Codeforces ELO | 2150 | 1718 | 1659 | 940 | 633 | 110 |
| GPQA Diamond | 84.3% | 82.3% | 78.8% | 58.6% | 43.4% | 42.4% |
| Tau2 (avg of 3) | 76.9% | 68.2% | 69.0% | 42.2% | 24.5% | 16.2% |
| BigBench Extra Hard | 74.4% | 64.8% | 53.0% | 33.1% | 21.9% | 19.3% |
| MMMLU (multilingual) | 88.4% | 86.3% | 83.4% | 76.6% | 67.4% | 70.7% |
| MMMU Pro (vision) | 76.9% | 73.8% | 69.1% | 52.6% | 44.2% | 49.7% |
| MATH-Vision | 85.6% | 82.4% | 79.7% | 59.5% | 52.4% | 46.0% |
| MRCR v2 128K long context | 66.4% | 44.1% | 43.4% | 25.4% | 19.1% | 13.5% |
Compare score differences by task
When choosing a smaller variant, check the benchmarks that match your workload.
12B and E4B differ substantially on reasoning benchmarks. AIME drops from 77.5% to 42.5%, Codeforces ELO from 1659 to 940, and BigBench Extra Hard from 53.0% to 33.1%. For mathematics, more complex code, or multi-step agents, evaluate the larger variants first, then check whether their results meet the needs of your actual task.
The differences are smaller on knowledge and multilingual benchmarks. MMLU Pro goes from 77.2% to 69.4%; MMMLU goes from 83.4% to 76.6%. E4B is usable for translation, summarization, classification, and question rewriting. I use E4B with Immersive Translate to read English web pages.
E4B’s lead over the previous generation’s 27B varies by task. AIME is 42.5% vs 20.8%, and Codeforces is 940 vs 110. MMLU Pro is 69.4% vs 67.6%, and MMMLU is 76.6% vs 70.7%. This 4.5B-effective model gains more on the listed reasoning benchmarks than on knowledge and multilingual benchmarks. The comparison uses the previous 27B model’s scores with thinking disabled.
26B A4B suits workloads that prioritize throughput. MMLU Pro at 82.6% and AIME at 88.3% are close to 31B, and Google describes inference speed as close to a 4B model. The differences are larger on long context (MRCR 44.1% vs 66.4%) and very hard questions (HLE 8.7% vs 19.5%). Include those differences when choosing a model for these tasks.
The size trap: parameter count does not give you VRAM
This is where variant selection most often goes wrong. My own first selection table was built by estimating “parameters × bit width”, and the entire table turned out to be wrong.
Here are the real total weight-file byte counts from the HuggingFace API, converted to GiB:
| Variant | bf16 | QAT W4A16 | q4_0 GGUF | mmproj |
|---|---|---|---|---|
| E2B | 9.54 | 7.75 | 3.12 | 0.92 |
| E4B | 14.89 | 10.72 | 4.80 | 0.92 |
| 12B Unified | 22.28 | 9.56 | 6.50 | 0.17 |
| 26B A4B | 48.07 | — | 13.45 | 1.11 |
| 31B | 58.25 | 21.67 | 16.44 | 1.12 |
In the QAT column, E4B in W4A16 is 10.72 GiB, while 12B Unified, with roughly three times the effective parameter count, is 9.56 GiB. Ranking the models by effective parameters gives a different order from ranking them by checkpoint size.
The reason is stated plainly in the QAT checkpoint’s config:
{
"quantization_config": {
"config_groups": {
"group_0": {
"targets": ["Linear"]
}
}
}
}
targets: ["Linear"] — only linear layers get quantized; embeddings stay untouched in bf16. For an ordinary model this barely matters, since embeddings are a small fraction of the whole. But the E-series PLE table alone is 2.8B parameters on E4B, and that entire block goes uncompressed, inflating the quantized checkpoint on its own.
GGUF q4_0 avoids this because it quantizes embeddings too, bringing E4B down to 4.80 GiB. This is precisely why small-VRAM machines should go GGUF plus llama.cpp rather than QAT weights plus vLLM.
vLLM’s strengths are batched throughput and concurrent scheduling on machines with ample VRAM. For single-user self-hosting with limited memory, llama.cpp is the better fit.
GGUF file size is not VRAM usage either
The estimator assigns about 2.2 GiB of the 4.80 GiB E4B q4_0 file to GPU weights. That value depends on an empirical CPU-resident deduction. It is not a replacement for the selected version’s per-device model-buffer logs.
That is because llama.cpp keeps the PLE table and token embedding in system RAM. Together they come to:
PLE table = vocab 262144 × layers 42 × PLE dim 256 = 2.82B params
token embd = vocab 262144 × hidden 2560 = 0.67B params
3.49B params total, roughly 2.6 GiB inside the GGUF
The two parameter-count products above are correct. The final “roughly 2.6 GiB” comes from the old estimator’s empirical average of 6.5 bits per parameter for those tensors, not a fixed q4_0 encoding size. GGUF can mix tensor types, and CPU placement depends on the engine. Subtracting a fixed 2.6 GB from file size is therefore not a VRAM identity across versions.
Measured on a laptop with 8 GB of VRAM, running E4B q4_0 through llama.cpp’s Vulkan backend with KV cache quantized to q8_0:
| Context | Measured VRAM | Notes |
|---|---|---|
| 8K | 2.90 GiB | Text only, mmproj not loaded |
| 32K | 4.25 GiB | With mmproj |
| 64K | 4.54 GiB | With mmproj |
| 128K | 5.14 GiB | With mmproj, full context |
The record at a configured 128K capacity with mmproj loaded is 5.14 GiB, with generation recorded at 63 to 66 tok/s. “Full context” in the table denotes the capacity setting. The available record does not show a peak measurement with 128K tokens filled and an image request running simultaneously. Budget display memory, other processes and image activations separately.
Choosing by VRAM
The original tier table is retained to document the old picker. Its 4 GB recommendation for E4B at 64K conflicts with the 4.54 GiB reading with mmproj above. Reduce context or omit mmproj and calculate again; that row does not establish a fit. In the 48 GB+ row, W4A16 still means 4-bit weights, so “no longer any need to lean on 4-bit” is incorrect. Other tiers are extrapolations under assumptions such as q4_0 GGUF and q8_0 KV, not measurements on each card:
| VRAM | Pick | Why |
|---|---|---|
| 4 GB | E4B (context capped at 64K) | Once PLE is deducted, only 2.16 GiB of weights land on the card — it fits better than you would guess. Drop to E2B if you want more headroom. |
| 6 GB | E4B | Full 128K context. Fine for translation, summarization, everyday Q&A. Do not expect it to solve math. |
| 8 GB | E4B with image input | Measured at 5.14 GiB for full 128K context plus mmproj, leaving nearly 3 GB free, at 63–66 tok/s. |
| 12 GB | 12B Unified | 6.50 GiB of q4_0 weights, good for 32K of context. The top edge of the reasoning cliff, and the most capable variant with audio support. |
| 16 GB | 12B Unified (W4A16 viable) | Reaches 64K of context. 26B A4B only barely fits at this tier and forces context down to 8K, which is not a good trade. |
| 24 GB | 26B A4B | 13.45 GiB of q4_0 weights with full 128K context. This is where MoE’s throughput advantage genuinely pays off. |
| 32 GB | 31B | 16.44 GiB of q4_0 weights, good for 64K. Choose it when you want maximum reasoning and long-context consistency. |
| 48 GB+ | 31B W4A16 | No longer any need to lean on 4-bit for footprint, and context opens up past 128K. |
These are rough tiers. Use the picker below or the VRAM calculator for an initial estimate of the card, context and concurrency. The old formula includes file sizes, an empirical CPU-resident deduction and approximate KV structure, fitted to the four points above. Its residuals are calibration errors; other variants and multi-GPU configurations remain extrapolations. Apply the preceding corrections to conflicting table rows. The picker starts at 16K, while the table uses the context and throughput priorities stated in each row.
Open these settings in the full calculator →
Assumes one GPU with 0.3 GB already in use, KV cache quantized to q8_0 and no image projector (mmproj) — the full calculator's defaults. The recommendation follows the same rule: the strongest variant that fits with headroom, then the largest format of that variant. Multi-GPU, image input and a row for every format are in the full calculator.
Three practical details the benchmarks do not show
E2B and E4B support disabling thinking.The exception in the official model card concerns whether empty thought tags remain in the output after thinking is disabled. With a chat template that supports the option, pass enable_thinking: false through chat_template_kwargs. The current official E4B template also defaults to false.
Correction, 2026-11-07: the paragraph above previously said E2B and E4B cannot turn thinking off. The model card’s exception concerns output format: with thinking disabled, the other Gemma 4 models still emit an empty thought block, while E2B and E4B omit it.
This Vulkan deployment needs flash attention enabled. With it disabled, I measured prompt processing at 39.6 tok/s; speed recovered after adding --flash-attn on. This setting has a large effect on performance for this model and backend. In llama.cpp b10216 and b12184 the default is auto: flash attention stays on unless the backend cannot run it on a layer’s device, and the startup log reports how it resolved.
Context allocation in llama.cpp depends on the KV mode.With explicit --parallel 4 and unified KV disabled, --ctx-size 16384 gives 4096 per slot; 16K per slot requires a total of 65536. The current automatic parallel mode enables unified KV. Requests then share the total pool, and one request can use up to the pool size. Check n_ctx, n_ctx_seq, and kv_unified against the server parameter documentation.
Correction, 2026-11-07: the paragraph above previously gave per-slot division as the rule: with 4 concurrent slots, --ctx-size 16384 gives each slot 4096. That holds only for independent slots; when --parallel is left unset, the llama.cpp server in b10216 and b12184 uses 4 slots with unified KV, and one request can use the whole 16384-token pool.
Summary
E2B/E4B suit edge devices and small-VRAM machines. 12B Unified scores higher on the reasoning benchmarks above and is the largest of these five variants that supports audio. 26B A4B suits workloads that prioritize throughput: several benchmark scores are close to 31B, and Google describes speed as close to 4B. 31B leads on the listed long-context and very hard reasoning benchmarks.
Check parameter counts, quantized file sizes, and loading behavior separately. The QAT sizes of E4B and 12B show that fewer effective parameters can still require more storage. The E4B measurements on an 8 GB card also show why GGUF file size cannot be used directly as VRAM usage.
So query the real byte counts, then measure.
Further reading
- VRAM Calculator — enter your GPU memory and context length to get a per-variant breakdown of weights, KV cache, and overhead.
- Deploy a Local LLM, Part 1: Pick the Right Model and Engine for Your VRAM — the full sequence from
nvidia-smito a systemd service. - Self-Hosting a Gemma 4 Gateway: Pitfalls You Only Hit by Running It — a record of the problems that actually came up during deployment.