Gemma 4 is a family of open-weight multimodal models from Google DeepMind. The lineup is designed for local deployment, reasoning, programming, image processing, and agentic scenarios involving calls to external tools. For a developer, the main question is not “how high are the numbers in the table?” but rather: “which version actually fits my hardware and workflow?”
Google introduced Gemma 4 on April 2, 2026. The family includes the E2B, E4B, 12B Unified, 26B A4B, and 31B models. The A4B designation refers to a mixture of experts: the model contains 25,2 billion parameters, but activates about 3,8 billion during inference. In the dense Gemma 4 31B, all 30,7 billion parameters are active.
What Is Gemma 4
Gemma 4 combines text and visual capabilities, and some models also accept audio. All versions support images, video is processed as a sequence of frames, and audio is available for E2B, E4B, and 12B Unified. The model generates text, so voice input does not mean that it automatically generates speech as output.
The architecture uses hybrid attention. Local sliding-attention windows alternate with global layers, with the final layer remaining global. This design is intended to reduce the load when working with long contexts while preserving the ability to take distant document fragments into account. The stated context length is 128 thousand tokens for E2B and E4B, and reaches 256 thousand tokens for 12B, 26B A4B, and 31B.
Gemma 4 has a configurable reasoning mode. The developer enables or disables thinking through the chat template and the parameters of the library being used. The history of a multistep dialogue must be constructed carefully: the manufacturer recommends preserving the final text in previous responses and not carrying internal reasoning into new turns, except in scenarios involving tool calls.
Which Variants Are Suitable for Local Deployment
| Model | Type | Parameters | Context | Modalities |
|---|---|---|---|---|
| Gemma 4 E2B | Dense | 2,3 billion effective, 5,1 billion with embeddings | 128K | Text, image, audio |
| Gemma 4 E4B | Dense | 4,5 billion effective, 8 billion with embeddings | 128K | Text, image, audio |
| Gemma 4 12B Unified | Dense, without separate encoders | 11,95 billion | 256K | Text, image, audio |
| Gemma 4 26B A4B | Mixture of Experts | 25,2 billion total, about 3,8 billion active | 256K | Text, image |
| Gemma 4 31B | Dense | 30,7 billion | 256K | Text, image |
For a laptop or mobile device, it makes more sense to start with E2B or E4B. These models use Per-Layer Embeddings, meaning separate small embedding tables for the decoder layers. Google describes this approach as a way to reduce the effective load during local deployment.
Gemma 4 26B A4B looks more appealing to users who need a stronger model without the full computational load of a dense 31B. However, active parameters do not equal the total memory footprint: system requirements are also affected by the weights of all experts, the context cache, multimodal components, and the specifics of the inference engine.
What the Reported Benchmarks Show
According to Google, Gemma 4 31B scored 84,3 percent on GPQA Diamond, a test of challenging scientific questions. On the AIME 2026 mathematics test without tools, it achieved 89,2 percent. On LiveCodeBench v6, which is used to evaluate programming, the model scored 80 percent.
| Area | Benchmark | Gemma 4 31B | Gemma 4 26B A4B | Gemma 4 12B Unified |
|---|---|---|---|---|
| General Knowledge and Reasoning | MMLU Pro | 85,2% | 82,6% | 77,2% |
| Mathematics | AIME 2026 without tools | 89,2% | 88,3% | 77,5% |
| Programming | LiveCodeBench v6 | 80,0% | 77,1% | 72,0% |
| Scientific Questions | GPQA Diamond | 84,3% | 82,3% | 78,8% |
| Agentic Tasks | Tau2, average across three scenarios | 76,9% | 68,2% | 69,0% |
These values cannot be interpreted as a universal probability of a correct answer. Each metric depends on the wording of the tasks, the dataset version, the reasoning mode, the permitted tools, and the scoring method. For example, Google separately reports the AIME results without tools, while for Humanity's Last Exam it gives a distinction between the no-search and search modes: for Gemma 4 31B, these are 19,5 and 26,5 percent, respectively.
In visual benchmarks, Gemma 4 31B scored 76,9 percent on MMMU Pro and 85,6 percent on MATH-Vision. For OmniDocBench 1.5, the reported average edit distance is 0,131, where a lower value is considered better. On the long-context MRCR v2 benchmark, with eight fragments hidden in a context of length 128K, the result was 66,4 percent.
Multimodal and Agentic Capabilities
Gemma 4 can recognize objects, analyze documents and PDF files, read charts, extract text from images, analyze handwritten notes, and understand interfaces. A variable visual-token budget is available for images: Google specifies values of 70, 140, 280, 560, and 1120. A lower budget reduces computation, while a higher one is better suited to OCR and small text.
Audio is supported by E2B, E4B, and 12B Unified. The maximum audio length stated in the model description is 30 seconds. Video is processed through frames, with a stated limit of 60 seconds at a rate of one frame per second. These limitations apply to the described operating mode and do not mean that every interface will automatically support such parameters.
Native function calling enables connections to search, databases, calculators, and other tools. However, the presence of structured function calling does not turn the model into a fully autonomous agent. The model must choose the right tool, formulate the arguments, wait for the result, and continue the chain of actions.
In discussions on the model page, developers described cases in which Gemma 4 announced the need to perform another request after the first search but ended its response without making the second call. A Google representative said that the team had reproduced a similar scenario and attributed some cases to a limited generation limit, when the tool call did not fit at the end of the reasoning. As a practical setting, the representative recommended checking the max_tokens limit, starting with 1024 or 2048 for longer tasks. This is the Google team's position on the scenario under discussion, not a universal guarantee that agentic behavior will be fixed.
Other discussion participants reported problems with the first autonomous tool call even when search was available and the generation limit was sufficient. Such observations remain user tests based on small samples. They show that a correct function-call format and reliable selection of the right moment to call a tool are separate tasks.
Hardware Requirements and Limitations of Local Use
Google does not specify one universal computer configuration for Gemma 4 31B. Requirements depend on the weight format, precision, context length, KV-cache size, number of parallel requests, and inference engine. Video memory capacity cannot be calculated solely from the number of parameters, especially for a multimodal model.
Regular weights and quantized variants are available for local deployment, including GGUF Q4_0, compressed tensors, and mobile formats. Quantization-Aware Training, or training that accounts for subsequent quantization, should preserve quality better than simply reducing precision after training, but the result depends on the specific checkpoint and deployment environment. The same file may behave differently in Transformers, llama.cpp, vLLM, and a mobile runtime.
It is best to begin configuration with a short context and a verified chat template, then separately measure speed, time to first token, memory consumption, and the stability of tool calls. The stated length of 256K does not mean that the workload will be equally fast across the entire length. A large context increases the KV-cache size and often reduces response speed.
Why Google’s Results Need to Be Independently Verified
The manufacturer's internal tables are useful for an initial comparison, but they do not replace testing on your own data. A benchmark tests a limited class of tasks, while a real project adds the Russian language, long documents, nonstandard tool schemas, external-service errors, and response-format requirements.
- Check scientific questions from your subject area, not only GPQA Diamond.
- Compare mathematical answers with an external calculator or formal verification.
- Run program code in an isolated environment and evaluate the tests, not only the solution text.
- For an agentic scenario, measure the first tool call, continuation after the tool response, and completion of the entire chain.
- Test the quantized and full-precision versions separately on identical prompts.
- Check how the model handles facts after the cutoff date for the training data, which for the described set is stated as January 2025.
Those who need a strong local model for reasoning, mathematics, code, and image analysis should consider Gemma 4 31B or 26B A4B. For limited hardware, it is more reasonable to start with E4B, E2B, or 12B Unified. Those building an agent with search and multiple tools need to evaluate not only benchmark scores but also the reliability of the complete action cycle.
Gemma 4 FAQ
Does Gemma 4 31B really run locally?
Yes, the open weights are intended for local and server deployment. The practical configuration depends on precision, quantization, context, and the engine being used, so there is no single video-memory recommendation for every case.
Which version is best for programming?
According to the reported results, Gemma 4 31B leads with 80 percent on LiveCodeBench v6. Gemma 4 26B A4B scores 77,1 percent, while 12B Unified scores 72 percent. For a specific project, the result should be verified on your own repository and test suite.
Can Gemma 4 be used as an autonomous agent?
The model supports native function calls, but autonomy depends on the chat template, tool schemas, generation limit, and orchestrator logic. Without checking results and access restrictions, it is safer to regard it as a component of an agentic system rather than an independent digital employee.
Does Gemma 4 have knowledge of events after January 2025?
The training data for the described release has a cutoff of January 2025. For current facts, you need to connect search or another external database and verify the model's answers against the retrieved data.
Compare models before you start
The service sets its plans, limits and model catalog. If they differ from this article, contact us so we can update it and record a new review date.
Browse modelsAffiliate link: your price stays the same and the project earns a commission.