Byte for byte, the most capable open models
Gemma 4 is Google DeepMind's open-weight model family, built from the same research as Gemini 3 and released under Apache 2.0. Five sizes span a phone and a datacenter rack - with reasoning, native multimodality, function calling and up to 256K of context in every one.
Apache 2.0 · Commercial use permitted · Weights are free, you pay only for compute
Sizes shown at Q4_0 quantisation · mobile builds are smaller still
Everything that shipped in 2026
Gemma 4 has moved fast since launch - a multi-token-prediction refresh two weeks in, a brand-new encoder-free 12B in June, and a mid-July weights update that quietly fixed the things agent builders were complaining about.
Five models, one architecture family
Pick by the hardware you actually have. Every model shares the same tokenizer, chat template, thinking mode and function-calling interface, so moving up or down a size is a config change, not a rewrite.
The strongest model in the family and the leading dense open model on the Arena text leaderboard. All 31B parameters active on every token - the choice when quality matters more than throughput.
- Context256K
- ModalitiesText + Image
- Memory (BF16)69.9 GB
- Memory (Q4_0)17.5 GB
26B total parameters, but only about 3.8B activate per token. Near-31B quality at a fraction of the inference cost, which makes it the default pick for high-volume serving.
- Context256K
- Active params~3.8B / token
- Memory (BF16)57.7 GB
- Memory (Q4_0)14.4 GB
Text, vision and audio in a single backbone with no separate encoders. Native audio input in a mid-sized open model, approaching 26B benchmarks on under half the memory. Fits a 16GB laptop.
- Context256K
- ModalitiesText·Img·Aud·Vid
- Memory (BF16)26.7 GB
- Memory (Q4_0)6.7 GB
Built for laptops, single consumer GPUs and higher-end handsets. Full multimodal input including audio transcription and translation, at a size that fits comfortably in 8GB of VRAM when quantised.
- Context128K
- Raw params4.5B
- Memory (Q4_0)4.5 GB
- Mobile build2.5 GB
The phone-class model. Ships through LiteRT-LM, MediaPipe and the Android AICore preview, with a mobile build just over a gigabyte - offline, private, and fast enough for interactive use.
- Context128K
- Raw params2.3B
- Memory (Q4_0)2.9 GB
- Mobile build1.1 GB
TranslateGemma (4B / 12B / 27B) for high-quality machine translation and MedGemma 1.5 (4B) for medical imaging and clinical text. Plus EmbeddingGemma, FunctionGemma, ShieldGemma and T5Gemma v2 across the wider ecosystem.
- TranslateGemmaJan 15, 2026
- MedGemma 1.5Jan 13, 2026
- LicenseApache 2.0
Memory requirements by precision
| Model | BF16 | SFP8 | Q4_0 | Mobile | Context |
|---|---|---|---|---|---|
| Gemma 4 E2B | 11.4 GB | 5.7 GB | 2.9 GB | 1.1 GB | 128K |
| Gemma 4 E4B | 17.9 GB | 8.9 GB | 4.5 GB | 2.5 GB | 128K |
| Gemma 4 12B | 26.7 GB | 13.4 GB | 6.7 GB | - | 256K |
| Gemma 4 26B A4B | 57.7 GB | 28.8 GB | 14.4 GB | - | 256K |
| Gemma 4 31B | 69.9 GB | 34.9 GB | 17.5 GB | - | 256K |
Figures are for weights at inference. Add headroom for the KV cache - Gemma 4's pp-RoPE scheme cuts that footprint by up to 37.5% versus a standard configuration.
What you get in every size
The interface is identical across the family. Prototype on E4B on your laptop, deploy on 31B in production, and none of your prompting or tool schemas need to change.
Configurable thinking
A thinking mode that emits reasoning traces before responding, and can be dialled down or off when you need latency instead of depth.
Native function calling
Tool schemas and strict structured JSON output are trained in, not prompted in - with July's patches fixing the JSON reliability issues agent builders hit at launch.
Multimodal input
Images at variable aspect ratio and resolution across the family; E2B, E4B and 12B add native video and audio understanding.
140+ languages
A 262K-entry SentencePiece vocabulary trained for genuine multilingual coverage, including audio transcription and translation on the edge models.
256K context
Long-context retrieval and reasoning on 12B, 26B and 31B; 128K on the edge models - enough for whole codebases and long document sets.
Multi-token prediction
MTP checkpoints enable self-speculative decoding without a separate draft model, plus FlashAttention 4 support on Hopper GPUs.
Code generation
80.0 on LiveCodeBench v6 for the 31B, with strong performance across 50+ programming languages and agentic coding workflows.
Apache 2.0, genuinely
Open weights, commercial use, redistribution and fine-tuning permitted. No usage caps, no revenue thresholds, no acceptable-use rider.
Benchmarks from the technical report
Instruction-tuned checkpoints, thinking mode enabled. The 31B ranks #3 among open models on the Arena text leaderboard and #6 for the 26B A4B - while frequently matching models an order of magnitude larger.
AIME 2026
GPQA Diamond
MMLU Pro
LiveCodeBench v6
Vision and full score table
| Benchmark | What it measures | 31B | 26B A4B | 12B |
|---|---|---|---|---|
| MMLU Pro | Broad knowledge & reasoning | 85.2 | 82.6 | 77.2 |
| AIME 2026 | Competition mathematics | 89.2 | 88.3 | 77.5 |
| GPQA Diamond | Graduate science reasoning | 84.3 | 82.3 | 78.8 |
| LiveCodeBench v6 | Code generation | 80.0 | 77.1 | 72.0 |
| MMMU Pro | Multimodal understanding | 76.9 | 73.8 | 69.1 |
| MathVision | Visual mathematical reasoning | 85.6 | 82.4 | 79.7 |
Source: Gemma 4 Technical Report (arXiv:2607.02770). Training data cutoff January 2025.
How Gemma 4 stacks up
The honest summary: frontier closed models still lead on absolute capability. Gemma 4's argument is that it is the most capable thing you can actually download, own, and run on a phone.
| Model | Weights | License | Max context | Multimodal | Runs on-device |
|---|---|---|---|---|---|
| Gemma 4 (Google) | Open | Apache 2.0 | 256K | Text·Image·Audio·Video | Yes - down to 1.1 GB |
| Llama 4 (Meta) | Open | Community license | Long | Text·Image | Limited |
| Qwen 3.6 (Alibaba) | Open | Apache 2.0 | Long | Text·Image | Partial |
| DeepSeek | Open | MIT / custom | Long | Mostly text | Rarely |
| Gemini 3 (Google) | Closed | API terms | Very long | Full | No |
| GPT-5 (OpenAI) | Closed | API terms | Long | Full | No |
| Claude Opus 4.x (Anthropic) | Closed | API terms | Long | Text·Image | No |
Choose Gemma 4 when…
Your data can't leave your infrastructure, you need offline or on-device inference, you want to fine-tune the weights, or per-token API pricing doesn't work at your volume.
Consider a frontier API when…
You need the absolute strongest reasoning available, don't want to manage serving infrastructure, or your volume is low enough that API pricing is cheaper than a GPU.
Or run both
A common pattern in 2026: E4B or 12B locally for routing, extraction and drafting, escalating only the hard cases to a larger hosted model. Most of the volume never leaves your machine.
Competitor rows are a positioning summary, not benchmarked head-to-head results - capabilities of hosted models change frequently. Verify current specs against each vendor's documentation.
Running in about two minutes
Pick your stack. If you pulled weights before mid-July 2026, re-pull them - the refresh included chat-template and tool-calling fixes that are worth having.
# Install Ollama, then pull a model that fits your machine ollama pull gemma4:e4b # ~4.5 GB - laptops, single consumer GPU ollama pull gemma4:12b # ~6.7 GB Q4 - 16 GB unified memory ollama pull gemma4:26b-a4b # ~14.4 GB Q4 - MoE, fast inference ollama pull gemma4:31b # ~17.5 GB Q4 - flagship quality # Chat interactively ollama run gemma4:12b # Or call the OpenAI-compatible endpoint curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"model":"gemma4:12b","messages":[{"role":"user","content":"Explain MoE routing"}]}'
from transformers import pipeline import torch pipe = pipeline( "text-generation", model="google/gemma-4-12b-it", torch_dtype=torch.bfloat16, device_map="auto", ) messages = [ {"role": "system", "content": "You are a precise technical assistant."}, {"role": "user", "content": "Summarise this paper in five bullets."}, ] out = pipe(messages, max_new_tokens=512) print(out[0]["generated_text"][-1]["content"]) # Multimodal: pass image or audio content blocks in the same messages list. # Thinking mode is controlled through the chat template kwargs.
# Production serving with an OpenAI-compatible API pip install vllm vllm serve google/gemma-4-26b-a4b-it \ --max-model-len 262144 \ --enable-auto-tool-choice \ --tool-call-parser gemma \ --tensor-parallel-size 2 # On Hopper GPUs, FlashAttention 4 (July 2026) gives # +25-70% prefill throughput and up to -31% time-to-first-token.
# GGUF quantisations for CPU + GPU offload git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp cmake -B build && cmake --build build --config Release -j # Pull a GGUF straight from Hugging Face and serve it ./build/bin/llama-server \ -hf google/gemma-4-12b-it-GGUF \ --ctx-size 32768 \ --n-gpu-layers 99 \ --port 8080
# Apple silicon - fastest path on an M-series Mac pip install mlx-lm mlx_lm.generate \ --model mlx-community/gemma-4-12b-it-4bit \ --prompt "Transcribe and summarise the attached audio." \ --max-tokens 1024 # 12B Q4 needs roughly 6.7 GB, so it fits a 16 GB Mac # alongside everything else you have open.
# Prefer not to host it? Gemma 4 is served by several providers. # Google AI Studio, Vertex AI, OpenRouter, Together, Fireworks. curl https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "google/gemma-4-31b-it", "messages": [{"role": "user", "content": "Hello!"}] }' # Hosted Gemma 4 typically prices well under $1 per million tokens. # Check each provider for current rates.
Exact model tags vary by provider - check the Hugging Face collection or your runtime's registry for current identifiers before copying these verbatim.
Where to get the weights
From a phone to a GPU cluster
The same weights run across the whole range. What changes is the runtime.
On-device
E2B and E4B ship through LiteRT-LM, MediaPipe and the Android AICore Developer Preview. Fully offline, no data leaves the handset, mobile builds from 1.1 GB.
Google Cloud
Vertex AI Model Garden for managed endpoints, Cloud Run for serverless GPU serving, and GKE when you need full control over autoscaling and topology.
AWS
Available in Amazon SageMaker JumpStart since April 2026, and on Amazon Bedrock in AWS GovCloud (US-West) since July for regulated US public-sector workloads.
Self-hosted
vLLM and SGLang for high-throughput serving, NVIDIA NIM and NeMo for enterprise GPU stacks, TGI and plain Docker for everything in between.
Fine-tuning
LoRA and QLoRA through TRL, PEFT and Unsloth; full fine-tuning with JAX or Keras. Apache 2.0 means you own and can redistribute the result.
Experimentation
Kaggle Notebooks give you free GPU time, Google AI Studio gives you a playground and an API key, and LM Studio gives you a desktop GUI with no terminal required.
Ecosystem support
Common questions
Is Gemma 4 really free, and can I use it commercially?
Yes. The weights are released under Apache 2.0, which permits commercial use, modification, redistribution and building proprietary products on top. There are no usage caps, revenue thresholds or acceptable-use riders attached to the license. You pay only for the compute you run it on - your own hardware, a cloud GPU, or a hosted provider's per-token fee.
Which model should I pick?
Start from your memory budget. Under 4 GB and you're on a phone: E2B. A laptop or single consumer GPU: E4B, or 12B if you have 16 GB. Serving at volume: 26B A4B, because only ~3.8B parameters activate per token. Maximum quality regardless of cost: 31B dense.
If you need audio input, use E2B, E4B or 12B - those are the models with native audio.
What changed in the July 2026 update? Is it "Gemma 4.1"?
No new version number - it's refreshed weights and configs under the existing Gemma 4 name. Three things matter: FlashAttention 4 support for NVIDIA Hopper GPUs (25–70% faster prefill, up to 31% lower time-to-first-token), substantially more reliable tool calling and JSON output, and a larger vision token budget that improves OCR on documents and screenshots.
The chat template also changed to reduce role-tag leakage. If you cached weights before mid-July, re-pull them.
What makes the 12B "encoder-free" and why does it matter?
Most multimodal models attach separate vision and audio encoders to a language backbone. Gemma 4 12B doesn't: image patches go through a lightweight embedding module - matrix multiplication, positional embedding, normalisation - and audio is projected directly into the same dimensional space as text tokens with no encoding stage at all.
Practically, that means fewer moving parts, lower memory, and quality approaching the 26B MoE at less than half the footprint. It's why 12B fits on a 16 GB laptop.
How long is the context window really?
256K tokens on 12B, 26B A4B and 31B; 128K on E2B and E4B. Gemma 4 uses a pp-RoPE positional scheme (p=0.25) that reduces KV cache footprint by up to 37.5%, which is what makes long context practical on modest hardware rather than just nominally supported.
Can I fine-tune it?
Yes, and the license lets you keep and redistribute the result. LoRA and QLoRA work through TRL, PEFT and Unsloth - QLoRA on E4B is comfortable on a single 24 GB card. Full fine-tuning is supported via JAX and Keras. Google also publishes fine-tuning notebooks you can run for free on Kaggle.
Does it run on a phone?
E2B is designed for it, with a mobile build around 1.1 GB, and E4B at roughly 2.5 GB works on higher-end devices. Distribution is through LiteRT-LM and MediaPipe, and Gemma 4 is in the Android AICore Developer Preview. Inference is fully offline - nothing leaves the device.
How does it compare to closed frontier models?
On raw capability, models like Gemini 3, GPT-5 and Claude Opus 4.x remain ahead. That's the honest answer.
Gemma 4's case is different: it's the strongest thing you can download and own. For workloads where data residency, offline operation, fine-tuning or per-token economics matter more than the last few benchmark points, that trade is usually the right one. Many teams run both - a small local model for the bulk of the volume, escalating only hard cases to a hosted frontier model.
What languages does it support?
140+ languages, backed by a 262K-entry SentencePiece vocabulary. The edge models additionally handle multilingual audio transcription and translation, with Japanese, German, French, Spanish, Italian, Russian and Chinese specifically evaluated in the technical report. If translation is your primary workload, look at TranslateGemma (4B / 12B / 27B) instead.
What's the knowledge cutoff?
Training data has a cutoff of January 2025. For anything more recent, use retrieval or tool calling rather than relying on the model's parametric knowledge - function calling is native and, since July, considerably more reliable.
What is "thinking mode"?
A configurable mode where the model emits reasoning traces before its final answer, which is what drives the strong AIME and GPQA numbers. It costs latency and tokens, so it's adjustable - turn it down for chat and classification, turn it up for maths, code and multi-step agentic work.
How popular is it?
The Gemma family passed 900 million cumulative downloads as of August 2026, with Gemma 4 accounting for more than 150 million of those since launch. It's among the most widely deployed open model families in production.
Download it. Own it. Ship it.
Open weights under Apache 2.0, five sizes, and a runtime for every piece of hardware you have. No API key required unless you want one.