Capabilities & Performance
What Gemma 4 can actually do - inputs, thinking, tool calling, vision, audio and long context - and how fast it runs on real hardware, with the settings that change both.
From Google's model card, capability guides and technical report ·
What each model accepts
Every Gemma 4 model reads text and images and writes text. Audio is the dividing line: only the three smaller models take it.
| Model | Text | Image | Video | Audio | Context | Output |
|---|---|---|---|---|---|---|
| Gemma 4 31B · dense | ✓ | ✓ | ✓ | - | 256K | Text |
| Gemma 4 26B A4B · MoE | ✓ | ✓ | ✓ | - | 256K | Text |
| Gemma 4 12B · unified | ✓ | ✓ | ✓ | ✓ | 256K | Text |
| Gemma 4 E4B · edge | ✓ | ✓ | ✓ | ✓ | 128K | Text |
| Gemma 4 E2B · on-device | ✓ | ✓ | ✓ | ✓ | 128K | Text |
From Google's model card. Video is handled as a sequence of image frames, which is why every size can take it; the card caps it at 60 seconds at one frame per second. If you need audio, the 12B is the ceiling. Sizes and file types are on the models page; full figures in technical specs.
What it can do
The same interface across all five sizes. The summary is in features; this page goes a level deeper.
Configurable thinking
Reasons before answering when you want accuracy; switch it off when you want speed.
Function calling
Built-in tokens for declaring tools, calling them and reading the results.
Vision
OCR, object detection, captioning, visual questions and reasoning over several images.
Long context
256K tokens on the three larger models and 128K on the edge models.
System role
Native support for system prompts, for steadier, more controllable conversations.
Text out only
It reads images and audio but does not create them. Output is always text.
Thinking mode
With thinking on, the model writes out its reasoning before the final answer. It is what drives the strong maths, science and coding scores - and it costs time and tokens, so it is yours to control.
text = processor.apply_chat_template(
message,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True, # False for fast replies
)
From Google's thinking guide. On Google's hosted API the equivalent is thinking_level,
set to "high" or "minimal" - see the API page.
When to turn it on
Maths, debugging, multi-step planning and anything where a wrong answer is costly.
When to turn it off
Chat, classification, extraction and routing, where latency matters more than depth.
Keep history clean
In multi-turn chats, pass back only the final answers. Earlier reasoning is dropped - except on tool-call turns, where it is kept.
Published benchmark scores assume thinking is on. Prompt-level advice is in prompting.
Tools and agents
Gemma 4 has dedicated tokens for tool use, so it can ask your program to look something up, run a calculation or take an action, then use the result. Your program stays in charge of what actually runs.
text = processor.apply_chat_template(
message,
tools=[weather_function_schema],
tokenize=False,
add_generation_prompt=True,
)
inputs = processor(text=text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64)
# The model replies with a tool call for your code to parse and run:
# <|tool_call>call:get_weather{location:<|"|>Kyoto<|"|>}<tool_call|>
It cannot run code itself
Google is explicit: the model only produces the call. Your code must parse it, validate the function name and arguments, and execute it.
Thinking helps it decide
With thinking on, the model reasons about whether a tool is needed and which one before it writes the call.
How reliable is it?
On the Tau2 agent benchmark the 31B scores 76.9 and E2B 24.5. Keep chains short on small models and check each step.
From Google's function-calling guide. The July 2026 weight refresh fixed tool-calling problems without a version bump - re-pull older downloads. For coding agents see the Claude Code guide; known gaps are in limitations.
Images and documents
All five models read images at their natural shape - no squashing to a square. You choose how much detail each image gets.
| Tokens per image | Use it for |
|---|---|
| 70 or 140 | Classification, captioning, video frames |
| 280 | The default - general image questions |
| 560 or 1,120 | OCR, document parsing, small text, dense charts |
What it handles
Object detection, OCR, visual question answering, captioning and reasoning across multiple images.
Put the image first
Google recommends placing image content before the text of your prompt.
Counting has limits
For very dense scenes it may estimate. Specific instructions give better results than vague ones.
From Google's vision guide and model card. Benchmark scores quoted for vision use the top budget of 1,120 tokens.
Speech and moving pictures
Audio works on E2B, E4B and 12B. Video works everywhere, as frames.
| Audio tasks | Speech recognition, speech translation, general speech understanding |
| Formats | MP3 or WAV, mono, 16 kHz |
| Length | Up to 30 seconds per clip |
| Cost | 25 tokens per second of audio |
| Placement | Audio after the text of your prompt |
| Video | Up to 60 seconds at one frame per second |
For longer recordings, split them into segments. Stereo files must be mixed down to one channel.
from transformers import pipeline
pipe = pipeline(
task="any-to-any",
model="google/gemma-4-E2B-it",
device_map="auto",
dtype="auto"
)
messages = [{
"role": "user",
"content": [
{"type": "text", "text": "Transcribe this audio."},
{"type": "audio", "audio": "audio_file.wav"},
]
}]
outputs = pipe(messages, return_full_text=False)
From Google's audio guide and model card. Running audio models on a phone is covered on the Android page and mobile downloads; the 12B has its own guide.
Four design choices that shape performance
Mixture of Experts
The 26B A4B activates about 3.8B of its 26B parameters per token, so it runs far faster than its size suggests - though all of it must sit in memory.
Encoder-free 12B
Image patches and raw audio are projected straight into the model with no separate encoders - fewer parts, less memory.
pp-RoPE positions
The technical report says the positional scheme, with p = 0.25, cuts the global KV-cache footprint by up to 37.5%, which is what makes long context practical.
Multi-Token Prediction
A 4-layer drafter, from about 76M to 500M parameters, proposes several tokens for the main model to verify at once.
From the technical report and Google's MTP overview. Which files to download for each is on the models page.
Measured speed
Google's published measurements for the edge models running through LiteRT-LM: 1,024 tokens in, 256 out.
Gemma 4 E2B - writing speed
| Device | Model | Writing | First word |
|---|---|---|---|
| MacBook Pro M4 Max | E2B | 160 t/s | 0.1 s |
| Linux PC, RTX 4090 | E2B | 143 t/s | 0.1 s |
| iPhone 17 Pro | E2B | 56 t/s | 0.3 s |
| Galaxy S26 Ultra | E2B | 52 t/s | 0.3 s |
| Galaxy S26 Ultra | E4B | 22 t/s | 0.8 s |
| Raspberry Pi 5 (CPU) | E2B | 8 t/s | 7.8 s |
From Google's LiteRT-LM overview and the LiteRT-LM model cards. On the same phone, switching E2B from CPU to GPU cut the wait for the first word from 1.8 seconds to 0.3 and memory from 1,733 MB to 676 MB. Server throughput for the 26B A4B and 31B depends heavily on hardware and serving stack and is not published by Google in a form this page could confirm - measure on your own setup, starting from self-hosting. Quality scores are on the benchmarks page.
Eight ways to make it faster
Use the drafter
Load the matching MTP drafter for faster generation with no quality loss. On the 26B A4B it may not help at batch size 1 on limited hardware.
Use QAT 4-bit
About a quarter of the memory of full precision, with quality close to it. See QAT builds.
Minimise thinking
For classification, routing and extraction, turn thinking down or off.
Lower the vision budget
Going from 1,120 to 280 tokens per image is four times less to read.
Prefer the MoE for volume
The 26B A4B does far less work per token than the dense 31B.
Right-size the model
The 12B gives much of the larger models' quality at a fraction of the memory.
Turn on the GPU
On phones and laptops, the GPU backend is the single biggest speed-up.
Shorten the input
Audio costs 25 tokens a second and each image up to 1,120. Send only what the question needs.
Memory planning is in the VRAM guide; runtime choice in the runtime selector; Apple silicon in Mac setup.
Which model for which job
| Workload | Recommended | Why |
|---|---|---|
| High-volume serving | 26B A4B | Only about 3.8B parameters active per token |
| Hardest reasoning | 31B, with its drafter | Best scores; the drafter recovers some speed |
| Audio input | 12B | The largest model that accepts audio |
| One consumer GPU or a laptop | 12B QAT | About 6.7 GB of memory at 4-bit, with 256K context |
| Phone, offline, private | E2B on GPU | 676 MB and 0.3 s to the first word in Google's test |
| Long-document retrieval | 31B | Holds accuracy best at 128K and beyond |
| Multi-step agents | 31B, current weights, short chains | The weakest area on small models - verify each step |
| Search and RAG retrieval | EmbeddingGemma 2 | Purpose-built for embeddings - see the guide |
Recommendations are this site's guidance based on the figures above. Get the files from the download hub or follow how to download and install; try before installing in the playground or chat; weigh cost on the pricing page.
Can Gemma 4 generate images or audio?
No. Every model outputs text only. Images, video and audio are inputs on the models that support them.
Which Gemma 4 models understand audio?
E2B, E4B and 12B. The 26B A4B and 31B accept text, images and video frames, but not audio.
Why is the 26B faster than the 31B?
It is a Mixture-of-Experts model: each token is routed through about 3.8B of its 26B parameters, so far fewer weights are read per token than in the dense 31B.
Should I always use the MTP drafter?
For interactive, low-concurrency use it is free speed with no quality loss. Google notes the 26B A4B drafter may give no gain at batch size 1 on hardware with limited parallelism.
Does thinking mode slow it down?
Yes. The reasoning is generated text, so it costs time and tokens. Published accuracy assumes it is on; turning it off trades accuracy for speed.
How much quality is lost at 4-bit?
Less than you might expect with Google's QAT builds, which are trained to tolerate quantisation. Below 4-bit, quality falls quickly.
Is the 256K context really usable?
On the larger models, yes for retrieval: the 31B scores 96.4 on RULER at 128K. On E2B the long window works for lookup but not for reasoning across documents.
How does it compare with other models?
See the model comparison, Gemma 4 vs Qwen 3.5 and, for the previous generation, the Gemma 3 page. Responsible-use notes are under safety.
See what it can do on your own task
Capabilities on paper matter less than results on your prompts.