• Artificial Intelligence

Gemma 4 by Google: Specs, Benchmarks, Model Sizes, and How to Run It Locally (2026 Guide)

Published On: 3 April 2026.By .
Open Models  ·  1B Downloads  ·  Android Studio Quail 4  ·  Full Benchmark Tables  ·  Developer Guide

Gemma 4 by Google: Specs, Benchmarks for All 5 Model Sizes & How to Run It Locally

Quick answer: Gemma 4 is Google DeepMind's open AI model family, announced March 31, 2026 under Apache 2.0. It ships in five sizes: E2B (phones), E4B (laptops and edge), 12B Unified (multimodal with audio, June 2026), 26B A4B MoE (3.8B active of 25.2B, consumer GPUs) and 31B Dense (workstations). The 31B scores 85.2% on MMLU Pro, 89.2% on AIME 2026, 84.3% on GPQA Diamond and 2150 Codeforces ELO. Every size takes image input; E2B, E4B and 12B also take audio. Context runs to 256K tokens on the three larger sizes. Multi-Token Prediction drafters make inference up to 3x faster at identical quality. As of August 20, 2026 the Gemma family has passed 1 billion downloads, and since September 1, 2026 Gemma 4 ships inside Android Studio Quail 4 as a fully local coding model. Install it in one command: ollama run gemma4.

Most open model guides go stale in six weeks. This one gets rewritten every time Google ships. Since the July version of this page, three things changed that actually affect what you should run: Gemma crossed a billion downloads, Google quietly refreshed every Gemma 4 checkpoint on July 15 with Flash Attention 4 and better tool calling, and Android Studio now bundles Gemma 4 so an entire refactor can happen offline on your laptop. Below is the current state of the family, with every benchmark number for every size, verified against Google's own model card.

~28 min read
Published:  ·  By
New: 1 Billion Downloads
New: Android Studio Quail 4
New: July 15 Model Refresh
Gemma 4
All-Size Benchmarks
On-Device AI
Deployment
Agentic AI
Quick Takeaways

Gemma 4 in 60 Seconds

Best short answer: Gemma 4 is Google's open-weight model family for local, edge and server deployment. Five sizes, image input on all of them, audio on three, up to 256K context, up to 3x faster with MTP drafters, and Apache 2.0 with no monthly active user cap.

01
Best model for most developers
The 26B A4B MoE. It lands within 2.6 points of the 31B on MMLU Pro and within 0.9 on AIME 2026 while activating only 3.8B parameters, and it fits a single RTX 3090 or 4090.
02
Best model for mid-range hardware
The 12B Unified for multimodal work (text, image, audio) on 12GB to 16GB GPUs or Apple Silicon. E2B for phones and IoT, E4B for laptops and higher-end mobile.
03
Best setup path
Start with Ollama or, for Android work, the engine bundled with Android Studio Quail 4. Move to llama.cpp with MTP drafters, LiteRT-LM, vLLM or Vertex AI for production. Re-pull any weights older than July 15, 2026.
Auriga IT banner introducing Google Gemma 4 open AI model family for edge and cloud deployment
Google Gemma 4 model family, open AI for edge to server deployment. Credit: Auriga IT
1 Billion
Gemma Downloads (Aug 20, 2026)
100K+
Community Model Variants
5
Model Sizes, Phone to Workstation
256K
Max Context Window (tokens)
89.2%
AIME 2026 Score (31B Dense)
Apache 2.0
No MAU Cap, No Revenue Share
01 - What's New

What Changed for Gemma 4 Since July 2026

Key takeaway: Three things. Gemma passed 1 billion downloads on August 20, 2026 with over 100,000 community variants. Google refreshed every Gemma 4 checkpoint on July 15 with Flash Attention 4, tool-calling reliability fixes and a new vision configuration, so weights pulled before that date are outdated. And on September 1, Android Studio Quail 4 shipped with Gemma 4 running locally inside the IDE.
1
Gemma Passes 1 Billion Downloads
Announced August 20, 2026. The family has doubled from roughly 500 million downloads at the Gemma 4 launch in March, and community developers have published more than 100,000 variants. Google's framing is worth noting: the download count matters less than what is being built with it.
2
July 15 Checkpoint Refresh RE-PULL
Google updated the Gemma 4 collection on Hugging Face with Flash Attention 4 for NVIDIA Hopper GPUs (25% to 70% higher prefill throughput, up to 31% faster time to first token), tool-calling reliability patches, a new default vision configuration for sharper OCR, and chat template fixes. Same model names, better build.
3
Gemma 4 Ships Inside Android Studio
Android Studio Quail 4, released September 1, 2026, bundles an inference engine that runs Gemma 4 locally. Native agentic tool calling means multi-step refactors run offline. Minimum 12GB RAM, 32GB or more recommended, plus 23 curated Android skills.
4
The Licensing Gap Widened
Qwen3.8-Max open weights landed on August 12, 2026 under a custom license that adds a revenue-sharing requirement for large commercial users, replacing Qwen's earlier Apache 2.0 terms. Gemma 4 stayed Apache 2.0. For anyone budgeting a commercial deployment, that difference now has a number attached to it.
5
Gemini Moved On Without Gemma
Google shipped Gemini 3.7 Flash in August 2026 (three weeks after 3.6 Flash, at half the prior pricing), plus Gemini 3.5 Transcribe and Gemini Omni 1.1 Flash. The cloud line is iterating faster than the open line, which is exactly the trade you accept when you choose weights you own.
6
MTP Is Now Just How You Run Gemma
Multi-Token Prediction drafters, released April 16, 2026, are supported across llama.cpp, Ollama, MLX, vLLM and Transformers. Up to 3x faster generation, identical output. If you are still running Gemma 4 without a drafter, you are leaving most of your throughput on the table.

Action item, 30 seconds: if you pulled Gemma 4 weights before July 15, 2026, pull them again. The model names did not change, so nothing will warn you. Run ollama pull gemma4, or re-download from the google/gemma-4 Hugging Face collection. Agent workloads with long tool schemas benefit most, because that is exactly what Flash Attention 4 accelerates.

02 - Changelog

Complete Gemma 4 Release Timeline (March to September 2026)

Open model guides age badly because the release cadence is monthly, not annual. Here is every dated Gemma 4 event in one place, so you can tell at a glance whether the version you are running is current.

  • SEP 1, 2026Android Studio Quail 4 ships with local Gemma 4Bundled inference engine, native agentic tool calling, 23 curated Android skills, 12GB RAM minimum and 32GB or more recommended. Final stable release of the Quail cycle.
  • AUG 20, 2026Gemma passes 1 billion downloadsOver 100,000 community variants published. Google also launched the Awesome Gemma GitHub repository as an official directory of community projects and tutorials.
  • AUG 12, 2026Qwen3.8-Max open weights released (competitive context)2.4T parameters with about 95B active, text-only, roughly 4.89TB in BF16, under a custom license with revenue sharing rather than Apache 2.0.
  • JUL 15, 2026Gemma 4 checkpoint refreshFlash Attention 4 on Hopper GPUs, tool-calling reliability fixes, new default vision configuration (280-token baseline bucket, 1120 maximum soft tokens), and chat template corrections. Re-pull required to benefit.
  • JUN 3, 2026Gemma 4 12B Unified releasedThe fifth size. 11.95B parameters, unified multimodal architecture with no separate vision or audio encoders, 256K context, text plus image plus audio input.
  • MAY 19-20, 2026Google I/O 2026Gemini 3.5 Flash, Gemini Spark, WebMCP browser agent standard, Managed Agents in the Gemini API, and open-weight models such as Gemma 4 added to Android Bench.
  • APR 16, 2026Multi-Token Prediction drafters releasedMTP variants published for E2B, E4B, 26B A4B and 31B under Apache 2.0. Up to 3x faster inference through speculative decoding with no quality change.
  • MAR 31, 2026Gemma 4 announcedInitial release in four sizes: E2B, E4B, 26B A4B MoE and 31B Dense, under Apache 2.0, with weights and documentation landing over the first days of April.
03 - Android Studio

Gemma 4 Inside Android Studio Quail 4: Local AI Coding With No Quotas

Key takeaway: Android Studio Quail 4, released September 1, 2026, ships a bundled inference engine that runs Gemma 4 on your own machine. Source code never leaves the laptop, there are no token quota limits, and because Gemma 4 supports native agentic tool calling, complex multi-file refactors can run entirely offline. You need 12GB of RAM at minimum and Google recommends 32GB or more.

This is the most significant distribution moment Gemma 4 has had. Until now, running an open model as your coding assistant meant assembling the stack yourself: Ollama or llama.cpp, a quantized GGUF, an editor extension, and a fair amount of configuration patience. Quail 4 removes all of it. The engine is in the IDE, the model is Gemma 4, and it works with the network off.

Two details make it more than a novelty. First, native agentic tool calling: the assistant is not limited to autocompleting a line, it can plan and execute a refactor across files. Second, 23 curated skills shipped with the IDE, covering Android Gradle upgrades, profiling, navigation frameworks and adaptive UI design. Those skills are the difference between a general-purpose model guessing at Android conventions and a model being pointed at the right ones.

The practical framing from Google is blunt and worth repeating: your source code never leaves your local machine and you never hit token quota limits. For agencies, contractors and anyone under a client NDA, that removes an entire category of procurement conversation.

What you need to run it

Minimum

12GB of system RAM. Workable for smaller edits and single-file assistance, but expect the model to compete with the IDE and emulator for memory.

Recommended

32GB or more. This is where multi-file agentic refactors stop feeling like a demo and start being faster than doing it by hand.

Best paired with

Apple Silicon or a discrete GPU. MTP speculative decoding gives the largest gains on exactly this kind of repetitive, high-boilerplate code generation.

Why this matters beyond Android: a first-party IDE shipping an open model as the default local assistant sets a precedent. The question for every other tool vendor stops being whether a local model is good enough and becomes which local model to bundle. Gemma 4 got there first with a mainstream IDE.

04 - Overview

What Is Gemma 4? Overview, Architecture and Licensing

Key takeaway: Gemma 4 is Google's open-weight model family, announced March 31, 2026 under Apache 2.0 and built from the same research and technology behind Gemini. Five sizes span smartphones to workstations. There are no commercial restrictions, no monthly active user cap and no revenue share.

Gemma 4 launched on March 31, 2026 in four sizes, with the fifth, the 12B Unified, added on June 3, 2026. The models come out of Gemini research and technology, but unlike Google's proprietary line they are published openly for anyone to download, modify, fine-tune and deploy.

The Apache 2.0 license is the part that changed the competitive picture. Developers and companies can use Gemma 4 commercially without negotiating anything. No monthly active user thresholds, no acceptable use annexes, no permissions to request. In August 2026, when Alibaba published the Qwen3.8-Max open weights under a custom license that includes a revenue-sharing requirement for large commercial users, the value of a plain Apache 2.0 grant became a line item rather than a philosophical preference.

Architecturally the family is not one design scaled up and down. The E2B and E4B use Per-Layer Embeddings to get the representational depth of a much larger model at a fraction of the resident memory. The 26B A4B is a Mixture of Experts model with 128 small experts, activating 8 per token plus one shared expert. The 12B Unified drops separate vision and audio encoders entirely and projects image patches and audio spectrograms straight into the transformer's embedding space. The 31B is a straightforward dense model where all 30.7B parameters fire on every token.

One specification that gets overlooked: the training data knowledge cutoff is January 2025. Gemma 4 is a strong reasoner over information you give it, not a current-events oracle. Plan for retrieval, tool calls or MCP connected sources in any deployment where recency matters.

05 - Model Sizes

Gemma 4 Model Sizes, Parameters and Hardware Requirements

Key takeaway: Five sizes. The 26B A4B MoE is the sweet spot for most developers: it activates 3.8B of 25.2B parameters per token, lands within about 2.6 points of the 31B on MMLU Pro, and fits a single RTX 3090 or 4090. The 12B Unified is the pick when you need audio input on mid-range hardware. Note that the 26B and 31B do not accept audio.

Google built Gemma 4 to span phones, laptops, consumer GPUs and production servers. Each size has a distinct deployment sweet spot, and the modality differences between them matter more than the parameter counts.

Gemma 4 model size comparison: E2B, E4B, 12B Unified, 26B A4B MoE and 31B Dense with parameters, use cases and context windows
Gemma 4 model size comparison: E2B, E4B, 12B Unified, 26B A4B MoE, 31B Dense.
Gemma 4 model sizes, modalities and minimum memory at Q4 quantization. Verified against the official Gemma 4 model card, September 2026.
Model Parameters Modalities Context Min RAM (Q4) Best For
Gemma 4 E2B2.3B effective (5.1B with embeddings)Text, image, audio128K~1.5 GBSmartphones, IoT, Raspberry Pi
Gemma 4 E4B4.5B effective (8B with embeddings)Text, image, audio128K~5 GBLaptops, mobile apps, edge devices
Gemma 4 12B Unified11.95BText, image, audio256K~8 GBMultimodal work on 12-16GB GPUs and Apple Silicon
Gemma 4 26B A4B MoE3.8B active of 25.2B totalText, image256K~14-18 GBConsumer GPUs (RTX 3090/4090), Mac
Gemma 4 31B Dense30.7B, all activeText, image256K~20 GBMaximum quality, research, fine-tuning

How to choose in one paragraph

If you have a single consumer GPU and no audio requirement, take the 26B A4B. If you need audio or you are on a 12GB to 16GB card or an Apple Silicon laptop, take the 12B Unified. If the target is a phone or an embedded board, take E2B. If it is a laptop app that must run without a GPU, take E4B. Take the 31B only when you have 20GB or more of VRAM and the last few benchmark points genuinely change the outcome, because it costs roughly eight times the compute per inference step of the 26B for a small quality gain.

A modality trap worth flagging: it is easy to assume the biggest model does everything. It does not. The 31B and 26B accept text and image only. Audio input lives on E2B, E4B and the 12B Unified. If your product transcribes or reasons over speech, your ceiling is the 12B, not the 31B.

Gemma 4 device compatibility: E2B on smartphones and Raspberry Pi, E4B on laptops, 12B Unified on mid-range GPUs, 26B MoE on RTX 3090 and 4090, 31B Dense on workstations and servers
Gemma 4 hardware compatibility, from Raspberry Pi and smartphones to data centre GPUs.
06 - Capabilities

Gemma 4 Capabilities: Reasoning, Vision, Audio, Code and Agents

Gemma 4 combines multi-step reasoning, structured output, multimodal input and long context. The July 15 refresh sharpened three of those specifically, so the capability picture in September 2026 is not the one from launch day.

01
Advanced Reasoning and Thinking Modes
Configurable thinking modes for multi-step planning and logic. The 31B hits 84.3% on GPQA Diamond, graduate-level reasoning, against 42.4% for Gemma 3 27B.
02
Function Calling, Now More Reliable
Native function calling, JSON structured output and system instructions. The July refresh targeted systematic JSON errors and parameter accuracy: Tau2 Telecom improved by about 10.1% and TB2 by about 4.5% on the 31B.
03
Code Generation
Codeforces ELO of 2150 on the 31B, up from 110 for Gemma 3, and 80.0% on LiveCodeBench v6. The 26B is close behind at 1718 ELO and 77.1%.
04
Vision With Sharper OCR
All five sizes take image input at variable resolution and aspect ratio. Since July, the default configuration uses a 280-token baseline bucket and 1120 maximum soft tokens, supporting roughly 2.51 megapixel inputs. Documents and screenshots read noticeably better.
05
Native Audio on Three Sizes
E2B, E4B and the 12B Unified accept audio input directly. This is the capability no comparable open family matches at these memory footprints. The 26B and 31B are text and image only.
06
Long Context and Faster Prefill
256K tokens on the 12B, 26B and 31B, 128K on E2B and E4B. Flash Attention 4 raised prefill throughput by 25% to 70% on Hopper GPUs, which is felt most on long system prompts and large tool schemas.
Gemma 4 key stats: 256K context window, 140+ pretraining languages, native audio, Apache 2.0 license
Gemma 4 capability callouts: 256K context, 140+ pretraining languages, native audio, Apache 2.0.

On the language claim: Gemma 4 was pretrained on more than 140 languages, and Google documents out-of-the-box supported quality for 35 or more. Those are different numbers doing different jobs. Treat 140+ as coverage and 35+ as the validated tier, and benchmark your own target languages before you promise anything to a client.

07 - Benchmarks

Gemma 4 Benchmarks: Every Score for All Five Model Sizes

Key takeaway: Most guides publish only the 31B numbers, which is unhelpful when you are choosing hardware. Here is the full instruction-tuned matrix from the official model card. The headline: the 26B A4B gives up 2.6 points of MMLU Pro and 0.9 points of AIME against the 31B while activating 3.8B parameters instead of 30.7B.
Gemma 4 instruction-tuned benchmark results, all five sizes. Source: official Gemma 4 model card, retrieved September 2026.
Benchmark 31B Dense 26B A4B 12B Unified E4B E2B
MMLU Pro85.2%82.6%77.2%69.4%60.0%
AIME 2026 (math)89.2%88.3%77.5%42.5%37.5%
GPQA Diamond84.3%82.3%78.8%58.6%43.4%
LiveCodeBench v680.0%77.1%72.0%52.0%44.0%
Codeforces ELO215017181659940633
MMMU Pro (vision)76.9%73.8%69.1%52.6%44.2%

How to read this table

Reasoning degrades gracefully, competitive coding does not. Look across the GPQA Diamond row: 84.3, 82.3, 78.8. You lose about six points going from the 31B all the way down to the 12B. Now look at Codeforces ELO: 2150, 1718, 1659, 940, 633. Competitive programming ability falls off a cliff. If your workload is contest-style algorithmic code, size matters enormously. If it is reasoning over documents, it barely does.

The 26B A4B is the value pick and it is not close. It trails the 31B by 2.6 points on MMLU Pro, 0.9 on AIME 2026 and 2.0 on GPQA Diamond, while activating 3.8B parameters per token instead of 30.7B. For anything that is not a coding contest, the quality difference is inside the noise of your own prompt engineering.

Do not dismiss the small models on these numbers. E2B scoring 60.0% on MMLU Pro sounds modest until you remember it runs in about 1.5GB of RAM on a phone, offline, with audio input. It is not competing with the 31B. It is competing with having no model at all in that context.

Generation speed: with MTP drafters enabled, dense models see roughly 2x to 3x faster generation, while the 26B MoE gains less because the architecture already reduces per-token compute. On Apple Silicon, Ollama's auto-tuned MTP roughly doubles throughput on real coding-agent workloads. Speed figures move with tooling releases, so treat any specific tokens-per-second number, including ours, as a snapshot rather than a specification.

Benchmark hygiene: these are Google's published instruction-tuned numbers, and every vendor publishes under favourable conditions. Quantization, prompt format, thinking-mode settings and sampling parameters all shift real results. Before committing to a size, run your own evaluation set on the two candidates either side of your best guess. It takes an afternoon and it has saved more deployments than any leaderboard.

08 - Comparison

Gemma 4 vs Qwen 3.6 and 3.8 vs Llama 4: The September 2026 Picture

Key takeaway: The comparison changed in August 2026. Qwen's flagship open weights moved upmarket and away from Apache 2.0: Qwen3.8-Max is 2.4T parameters, text-only, roughly 4.89TB in BF16, and licensed with a revenue-sharing requirement. That leaves Gemma 4 as the strongest fully permissive family you can actually run on hardware you own, while Qwen 3.6 at the 27B tier remains the community pick for text-only local coding.
Open-weight model comparison as of September 2026. Competitor figures are directional and drawn from vendor announcements and community testing.
Dimension Gemma 4 Qwen 3.6 (~27B) Qwen3.8-Max Llama 4 Scout
LicenseApache 2.0, no capsApache 2.0Custom, revenue share for large commercial usersMeta license, 700M MAU cap
Runs on consumer hardwareYes, phone to workstationYes, high-memory Mac or 24GB GPUNo, GB300 class or heavy multi-GPUNo small variant
Smallest modelE2B, ~1.5GB at Q4Sub-1B variants available2.4T total, ~4.89TB BF16109B total
Image inputAll five sizesVaries by variantAPI only, not in open weightsYes
Audio inputE2B, E4B, 12B nativeOmni variant onlyNo, text-only weightsNo
Context window256K128K to 256K1M on API, reduced in open weights10M
Math (AIME class)89.2% on 31BStrong, below GemmaFrontier classNot competitive
Local coding favouriteStrong, and bundled in Android StudioCommunity pick for text-onlyImpractical locallyRarely used locally
Inference accelerationOfficial MTP drafters, Apache 2.0Generic speculative decodingFP8 official buildGeneric speculative decoding

The honest verdict

Pick Gemma 4 when

You need to run on hardware you own, you want image or audio input, you are deploying to edge or mobile, licensing certainty matters to your legal team, or you are building Android.

Pick Qwen 3.6 when

The workload is text-only production coding on a high-memory Mac or a 24GB GPU, and you have benchmarked it against Gemma 4 on your own repository.

Pick Qwen3.8-Max when

You have data-centre serving capacity, need the largest open model available, and your legal team has read and accepted the revenue-sharing terms.

Pick Llama 4 Scout when

You need a genuinely enormous context window, 10M tokens, and you stay comfortably under the 700M monthly active user threshold.

Beyond these four, teams are also evaluating Mistral for European data sovereignty, DeepSeek for cost-efficient Chinese-language work, and Microsoft's Phi family for ultra-lightweight edge scenarios, alongside proprietary options from Anthropic and OpenAI. None of them currently combine Gemma 4's span of hardware coverage, multimodal input, official inference acceleration and unrestricted licensing in one family.

09 - In Production

Gemma 4 in Production: Where It Is Actually Deployed

Key takeaway: Benchmarks tell you what a model can do; deployments tell you what it survives. Gemma 4 now runs inside a national health app with over 100 million Android downloads, in cancer research that produced a lab-verified finding, in marine biology, and on satellites in orbit.
01
Aarogya Setu 2.0, India
India's National Health Authority integrated Gemma 4 into Aarogya Setu 2.0, an app with more than 100 million downloads on Android. It is one of the largest public deployments of an open model in a citizen-facing health service anywhere.
02
C2S-Scale Cancer Research
Researchers at Yale and Google built C2S-Scale on Gemma, and it identified a novel cancer therapy pathway that was subsequently verified in living cells. A generated hypothesis that held up at the bench is a far stronger signal than any leaderboard position.
03
DolphinGemma
A Gemma variant that processes dolphin vocalisations for interspecies communication research, an example of the small on-device sizes being used where sending audio to a cloud API is simply not an option.
04
Gemma in Orbit
NASA, Satlyt and Starcloud run Gemma models in space. It is a memorable proof point for a mundane engineering requirement: inference where there is no reliable link back to a data centre.
05
100,000+ Community Variants
Developers have published over 100,000 Gemma derivatives. Google's Awesome Gemma repository now serves as the official directory of community projects, tutorials and tooling.
06
1,600+ Kaggle Challenge Projects
The recent Kaggle Gemma Challenge drew more than 1,600 submissions aimed at real-world problems, which is a useful source of reference implementations if you are starting a build.

The pattern across all of these is the same: they are places where an API call was either impossible, too expensive at volume, or unacceptable on privacy grounds. That is the honest use case for open weights, and it is a large one.

10 - Agentic AI

Gemma 4 for Agentic AI, MCP and WebMCP

Key takeaway: For agent workloads the July 15 refresh matters more than any benchmark headline. Tool-calling reliability improved by up to about 10.1% on Tau2 Telecom, and Flash Attention 4 raised prefill throughput by 25% to 70%, which is precisely the bottleneck when every turn re-reads a long system prompt and a large tool schema.

Agents fail on reliability, not intelligence. A model that produces a correct answer 95% of the time and a malformed JSON tool call the other 5% is unusable in a ten-step workflow, because compounding failure takes you to roughly a 60% success rate. This is why Google's July patches, which targeted systematic JSON errors and parameter accuracy rather than raw reasoning, are the most consequential Gemma 4 update of the year for anyone building agents.

The second half is latency. In an agent loop, every tool result is appended and the whole context is re-processed. Prefill, not generation, becomes the dominant cost. Flash Attention 4 on Hopper GPUs delivers 25% to 70% higher prefill throughput and up to 31% faster time to first token, and that translates directly into agent loops that feel responsive instead of sluggish.

Standards support: Gemma 4 works with Anthropic's Model Context Protocol, the de facto standard for connecting models to external tools and data. Google extended the same idea into the browser with WebMCP, proposed at I/O 2026, which lets browser-based agents call JavaScript functions and interact with HTML forms through a standard interface, with an origin trial beginning in Chrome 149. Any model with function calling can participate, and Gemma 4's advantage is that it can do so locally, with no per-call cost and no data leaving your infrastructure.

Android Studio Quail 4 is the clearest working example of this stack: an agentic model, a curated skill set, tool calling and a local runtime, executing multi-file refactors with the network disconnected.

11 - Local Coding

Local Vibe Coding With Gemma 4

Key takeaway: The two objections to local coding models were quality and speed. Gemma 4's 31B posts 2150 Codeforces ELO and 80.0% on LiveCodeBench v6, and MTP drafters roughly double generation throughput on real coding-agent benchmarks. Since September, Android Studio ships it by default.

Cloud coding assistants are excellent and they all share one property: your code, your prompts and your context leave your machine. For a solo developer on a side project that is a non-issue. For an agency under client NDA, a bank, a hospital or anyone with a data residency clause in their contract, it is the whole conversation.

Gemma 4 makes the local alternative credible rather than merely possible. Code is also the ideal workload for speculative decoding, because closing brackets, repeated identifiers and boilerplate are exactly what a small drafter predicts well, so MTP delivers its largest gains here. Ollama's auto-tuned MTP on Apple Silicon roughly doubles generation speed on coding-agent benchmarks without changing a single output token.

Practical setups, in ascending order of effort: Android Studio Quail 4 if you are building Android, since it is already installed. LM Studio for a chat interface plus an OpenAI-compatible local API. Continue.dev pointed at a local Ollama endpoint for in-editor completion in VS Code or JetBrains. llama.cpp with an MTP drafter when you want maximum throughput and are willing to tune flags.

One expectation to set honestly: on hard, novel algorithmic problems a frontier cloud model is still ahead. What a local Gemma 4 gives you is a strong assistant for the 90% of work that is refactoring, boilerplate, test writing, translation between frameworks and explaining unfamiliar code, at zero marginal cost and zero data exposure.

12 - Getting Started

How to Download and Run Gemma 4 Locally (Ollama, llama.cpp, LM Studio)

Key takeaway: Ollama is the fastest path and enables MTP acceleration automatically on Apple Silicon. Use llama.cpp with drafter models for maximum control and MTP on NVIDIA GPUs, LM Studio for a visual interface, and vLLM for production serving. Whichever you choose, make sure your weights are from July 15, 2026 or later.

Step 1: Install with Ollama (easiest method)

# Install Ollama (macOS / Linux)
curl -fsSL https://ollama.com/install.sh | sh

# Run the default 26B A4B MoE model (recommended for most developers)
ollama run gemma4

# Or choose a specific Gemma 4 size:
ollama run gemma4:e2b   # Edge: phones, Raspberry Pi (~1.5GB)
ollama run gemma4:e4b   # Edge: laptops, mobile apps (~5GB)
ollama run gemma4:12b   # Unified multimodal with audio (~8GB Q4)
ollama run gemma4:26b   # MoE: best speed/quality balance (~14-18GB)
ollama run gemma4:31b   # Dense: maximum quality (~20GB)

Step 2: Refresh weights pulled before July 15, 2026

# The July 15 build adds Flash Attention 4, tool-calling fixes,
# a new vision config and chat template corrections.
# Model names did not change, so nothing warns you.

ollama pull gemma4
ollama pull gemma4:12b

# Hugging Face users: re-download from the google/gemma-4 collection.

Step 3: Visual interface with LM Studio

If you prefer a GUI, LM Studio offers one-click download and chat for all Gemma 4 variants. Download it from lmstudio.ai, search for Gemma 4 in the model browser, choose your size and quantization, and start chatting. LM Studio also exposes a local OpenAI-compatible API server, which is the simplest way to point an existing application at a local model without changing your code.

Step 4 (advanced): maximum control with llama.cpp and MTP

# Build llama.cpp with GPU support
git clone https://github.com/ggml-org/llama.cpp
cmake llama.cpp -B llama.cpp/build -DGGML_CUDA=ON
cmake --build llama.cpp/build --config Release -j

# Run the Gemma 4 26B A4B MoE model
./llama.cpp/llama-cli \
  -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_XL \
  --temp 1.0 --top-p 0.95 --top-k 64

# For 2-3x speed on dense models, add the MTP assistant drafter:
# download both the base GGUF and its -assistant GGUF, then serve with
#   --model-draft  --spec-type draft-mtp --spec-draft-n-max 4
# Tip: QAT checkpoints preserve the MTP speedup when quantized.
# Note: MTP helps dense models most (12B/31B); the 26B MoE gains less.

On Apple Silicon use -DGGML_CUDA=OFF; Metal is enabled by default. Known issue: quantizing the KV cache to q8_0 can degrade MTP acceptance rates, so keep the KV cache at f16 when using drafters.

Step 5: Python developers, Hugging Face Transformers

pip install transformers torch
# Load with model ID: google/gemma-4-31B-it
# MTP drafters ship under the matching -assistant repositories,
# released April 16, 2026 under the same Apache 2.0 license.

Try it without installing anything

Explore the larger Gemma 4 models in Google AI Studio. For on-device variants, see Google's AI Edge resources. Android developers get it built in with Android Studio Quail 4.

Supported tools and frameworks: Hugging Face Transformers, vLLM, llama.cpp, MLX on Apple Silicon, LM Studio, Ollama, Android Studio Quail 4, NVIDIA NIM and NeMo, Unsloth, SGLang, Keras, Docker, Google Cloud (Vertex AI, GKE, GCE, TPUs) and more.

13 - Edge Deployment

Can Gemma 4 Run on a Smartphone? Edge Deployment Guide

Yes. E2B and E4B were built for on-device use and run offline on smartphones, Raspberry Pi boards and embedded hardware such as NVIDIA Jetson. At 4-bit, E2B fits in roughly 1.5 GB of RAM and E4B in about 5 GB. The 12B Unified extends the same multimodal capability to laptops and mid-range GPUs at around 8 GB quantized.

E2B, E4B and the 12B Unified all accept native audio input, which neither Llama 4 nor the open Qwen weights offer at these footprints. That combination, small enough for a phone and able to hear, is what makes deployments like Aarogya Setu 2.0 possible: an app with over 100 million Android downloads running an open model on the handset itself.

The agentic angle makes on-device more interesting than it was a year ago. A warehouse scanner running E2B can read a barcode, check inventory through an MCP tool call over the local network and trigger a reorder, with no cloud round trip in the loop and nothing sensitive leaving the building.

Gemma 4 memory requirements by size and quantization level, September 2026.
Model 4-bit (Q4) 8-bit Full precision Audio input
Gemma 4 E2B~1.5 GB~3 GB~10 GBYes
Gemma 4 E4B~5 GB~8 GB~15 GBYes
Gemma 4 12B Unified~8 GB~13 GB~16 GB (BF16 VRAM)Yes
Gemma 4 26B A4B MoE~14-18 GB~28 GB~52 GBNo
Gemma 4 31B Dense~20 GB~34 GB~62 GBNo
14 - Fine-Tuning

Fine-Tuning Gemma 4 With QLoRA: Hardware and Tooling

Apache 2.0 allows unrestricted fine-tuning on proprietary data, with no permission request and no obligation to publish the result. Using QLoRA through tools such as Unsloth, the 31B can be fine-tuned with as little as 16 GB of VRAM, which a single RTX 4090 provides. Full fine-tuning of all parameters needs roughly 80 GB.

Supported paths include Google Colab, Vertex AI, Hugging Face TRL, Unsloth and consumer GPUs. For most domain adaptation work QLoRA is sufficient, and it is dramatically cheaper to iterate on.

The most common fine-tuning objective in 2026 is not knowledge injection, it is reliability: training the model to call the right tools with correctly typed parameters, return schema-valid JSON every time, and follow a specific multi-step workflow without improvising. Google's July tool-calling patches raised the baseline, but a domain-specific fine-tune on your own tool schemas still buys a meaningful reduction in retry rate.

A practical note on size selection for fine-tuning: teams frequently fine-tune the 12B or the 26B rather than the 31B, because the smaller starting point trains faster, serves cheaper and, after adaptation to a narrow domain, often closes most of the gap to the larger base model on that domain.

15 - Business Case

Why Businesses and Developers Should Care

01
Privacy by Architecture
Running Gemma 4 locally means sensitive data never reaches a third party. That is an architectural guarantee rather than a contractual one, which is a materially different conversation in healthcare, finance and legal work under HIPAA, GDPR or data residency rules.
02
Predictable Cost at Scale
No per-token billing. Costs become hardware and electricity, which are capacity planning problems rather than usage risks. MTP improves throughput on the same hardware at no additional cost.
03
Full Customization
Fine-tune, quantize, distil and package for your domain. No vendor roadmap dependency and no model deprecation notice arriving mid-quarter.
04
Licensing Certainty
Apache 2.0 with no monthly active user cap and no revenue share. As of August 2026 that is a genuine differentiator: Llama 4 carries a 700M MAU threshold and Qwen3.8-Max moved to a custom license with revenue sharing for large commercial users.
05
Agent-Ready Foundations
Native function calling, structured JSON, 256K context, MCP and WebMCP compatibility, and July's reliability patches. Enough to build agents that survive contact with production.
06
Offline Capability
Factory floors, field service, remote sites, aircraft, spacecraft and any environment with intermittent connectivity. Gemma runs where an API cannot reach, which is the deciding factor in more industrial deployments than most cloud-first teams expect.

For teams looking to deploy AI at scale, Gemma 4's compatibility with mainstream inference frameworks, MCP tool ecosystems and cloud platforms makes the path from prototype to production shorter than it has been. Cygnus Alpha by Auriga IT helps integrate open models into real business workflows.

16 - Limitations

Limitations and Honest Trade-Offs

Key takeaway: Gemma 4 is not the right answer for every workload. The January 2025 knowledge cutoff, the missing audio support on the two largest sizes, the 256K context ceiling and the operational burden of self-hosting are all real constraints worth planning around.

1. The knowledge cutoff is January 2025

Gemma 4 knows nothing about events after January 2025 and will answer confidently about them anyway. Any deployment touching current information needs retrieval augmented generation, live tool calls or MCP connected data sources. This is not a defect, it is a property of every static model, but it catches teams who benchmark on reasoning tasks and then deploy on current-events questions.

2. The two largest models cannot hear

The 26B A4B and 31B Dense accept text and image only. If your product needs audio, your quality ceiling is the 12B Unified, not the 31B. Discover this during architecture, not during integration.

3. Context tops out at 256K

Generous for most work, and well short of Llama 4 Scout's 10M. If your use case genuinely requires ingesting an entire large repository or a corpus of long documents in a single pass, Gemma 4 is the wrong tool and chunking with retrieval is the workaround.

4. Self-hosting has an operational cost

Zero API billing is not zero cost. Someone maintains the serving stack, monitors GPU utilisation, handles quantization trade-offs, manages weight updates like the July refresh, and gets paged when throughput degrades. At small volume, a cloud API is often cheaper all-in. The economics turn in favour of self-hosting at sustained volume, or immediately when privacy is non-negotiable.

5. Frontier cloud models are still ahead at the top end

On the hardest novel reasoning and coding problems, Gemini 3.7 Flash and its peers remain ahead of any open model you can run on a workstation. The honest question is not which is better in the abstract, it is whether the gap matters for your specific workload. For a great deal of production work, it does not.

6. Language support is uneven

Pretraining spans 140+ languages but validated out-of-the-box quality is documented for 35 or more. Performance in the long tail varies. Benchmark your target languages rather than assuming coverage equals quality.

17 - Sources & Verification

Sources Used to Verify This Guide

Every specification, benchmark score and date on this page was checked against a primary source in September 2026. Where a figure comes from community testing rather than Google, it is labelled as directional in the text. If you find a number here that has since changed, the changelog above is the first thing we update.

Editorial policy: this page is re-verified against primary sources on a monthly cadence, and the changelog records what moved. Open-model benchmark tables and leaderboard positions change faster than any static guide can promise accuracy, so every volatile figure here carries the date it was checked.
18 - FAQ

Frequently Asked Questions About Gemma 4

What is Gemma 4?

Gemma 4 is Google DeepMind's most capable family of open AI models, announced March 31, 2026 under Apache 2.0. It ships in five sizes: E2B, E4B, 12B Unified, 26B A4B MoE and 31B Dense. All five take image input, three take audio, and context runs to 256K tokens on the three larger sizes.

How many downloads does Gemma have?

Google announced on August 20, 2026 that Gemma has passed 1 billion downloads, with more than 100,000 community variants published. That is roughly double the 500 million figure reported around the Gemma 4 launch in March 2026.

Is Gemma 4 built into Android Studio?

Yes. Android Studio Quail 4, released September 1, 2026, bundles an inference engine that runs Gemma 4 locally. It needs 12GB of RAM minimum, 32GB or more recommended. Native agentic tool calling lets it run multi-step refactors offline, so source code never leaves the machine and there are no token quotas. It ships with 23 curated Android skills.

What changed in the July 2026 Gemma 4 refresh?

On July 15, 2026 Google refreshed the checkpoints with four changes: Flash Attention 4 for NVIDIA Hopper GPUs (25% to 70% higher prefill throughput, up to 31% faster time to first token), tool-calling reliability fixes (Tau2 Telecom up about 10.1%, TB2 up about 4.5% on the 31B), a new default vision configuration using a 280-token baseline bucket and 1120 maximum soft tokens for sharper OCR, and chat template corrections. Model names did not change, so re-pull your weights if they predate that date.

What are the Gemma 4 benchmark scores for every model size?

Instruction-tuned, from the official model card. MMLU Pro: 31B 85.2%, 26B 82.6%, 12B 77.2%, E4B 69.4%, E2B 60.0%. AIME 2026: 89.2%, 88.3%, 77.5%, 42.5%, 37.5%. GPQA Diamond: 84.3%, 82.3%, 78.8%, 58.6%, 43.4%. LiveCodeBench v6: 80.0%, 77.1%, 72.0%, 52.0%, 44.0%. Codeforces ELO: 2150, 1718, 1659, 940, 633. MMMU Pro vision: 76.9%, 73.8%, 69.1%, 52.6%, 44.2%.

What is Gemma 4 12B Unified?

The fifth Gemma 4 size, released June 3, 2026. It has 11.95B parameters and a unified multimodal architecture with no separate vision or audio encoders: image patches and audio spectrograms pass through lightweight projection layers instead. It takes text, image and audio, supports 256K context, and runs in about 16GB VRAM at full precision or 8GB quantized. It scores 77.2% on MMLU Pro and 78.8% on GPQA Diamond.

What is Gemma 4 MTP (Multi-Token Prediction)?

Lightweight companion drafter models released April 16, 2026 for E2B, E4B, 26B A4B and 31B. They use speculative decoding for up to 3x faster inference with identical output: the drafter proposes several tokens and the main model verifies them in one parallel pass, sharing the target's KV cache. Supported in llama.cpp, Ollama, Hugging Face Transformers, vLLM and MLX, under Apache 2.0.

Is Gemma 4 free to use commercially?

Yes. Apache 2.0 allows unlimited commercial use, modification, fine-tuning and redistribution, with no royalties and no monthly active user cap. As of September 2026 that is more permissive than Llama 4 (700M MAU restriction) and than Qwen3.8-Max, whose August 2026 open weights carry a custom license with a revenue-sharing requirement for large commercial users.

What are the Gemma 4 model sizes?

E2B: 2.3B effective parameters (5.1B with embeddings), about 1.5GB at Q4. E4B: 4.5B effective (8B with embeddings), about 5GB. 12B Unified: 11.95B, about 8GB. 26B A4B MoE: 3.8B active of 25.2B total, 14GB to 18GB. 31B Dense: 30.7B all active, about 20GB.

How do I download and run Gemma 4 locally?

Install Ollama from ollama.com and run ollama run gemma4 for the 26B A4B, or gemma4:12b for the Unified model. Weights are also on Hugging Face, Kaggle and NVIDIA NIM. Android developers can use the copy bundled with Android Studio Quail 4.

What hardware do I need to run Gemma 4?

E2B about 1.5GB at Q4 (smartphones, Raspberry Pi). E4B about 5GB (laptops). 12B Unified about 8GB quantized or 16GB full precision (RTX 4070 class, Apple Silicon). 26B A4B 14GB to 18GB at Q4 (single RTX 3090 or 4090, or a 24GB Mac). 31B about 20GB at Q4. Android Studio's bundled engine asks for 12GB system RAM minimum, 32GB or more recommended. All sizes run on CPU, more slowly.

How does Gemma 4 compare to Qwen 3.8?

They target different tiers now. Qwen3.8-Max open weights (August 12, 2026) are 2.4T parameters with about 95B active, roughly 4.89TB in BF16, text-only, and realistically need GB300 class or heavily quantized multi-GPU serving. The license moved away from Apache 2.0 and adds revenue sharing for large commercial users. Gemma 4 is the family you can run on a phone, laptop, single GPU or workstation, with image input everywhere and audio on three sizes, under clean Apache 2.0 terms. At the 27B tier, Qwen 3.6 remains a strong text-only local coding choice.

How does Gemma 4 compare to Llama 4?

Gemma 4 31B beats Llama 4 Scout (109B total) on reasoning, including GPQA Diamond at 84.3% against roughly 74.3%. Gemma 4 is Apache 2.0 with no caps while Llama 4 has a 700M MAU restriction, and Gemma 4 covers edge deployment where Llama 4 has no small model. Llama 4 Scout leads on context window at 10M tokens.

Can Gemma 4 run on a smartphone?

Yes. E2B fits in roughly 1.5GB RAM at Q4, runs on modern Android phones through Google AICore, works fully offline, accepts native audio and handles 128K context. India's National Health Authority integrated Gemma 4 into Aarogya Setu 2.0, an Android app with more than 100 million downloads.

What is the Gemma 4 context window?

128K tokens on E2B and E4B. 256K tokens on the 12B Unified, 26B A4B MoE and 31B Dense.

Does Gemma 4 support images, video and audio?

All five sizes accept text and image at variable resolution. E2B, E4B and the 12B Unified also accept native audio; the 26B and 31B do not. Video is handled through frame sequences. Since July 15, 2026 the default vision configuration uses a 280-token baseline bucket and 1120 maximum soft tokens, supporting roughly 2.51 megapixel inputs.

What is the Gemma 4 knowledge cutoff?

January 2025, per the official model card. For anything more recent, pair Gemma 4 with retrieval augmented generation, live tool calls or MCP connected data sources.

How many languages does Gemma 4 support?

Pretrained on more than 140 languages, with documented out-of-the-box support for 35 or more. Treat 140+ as coverage and 35+ as the validated tier, and benchmark your own target languages before production.

Can Gemma 4 be fine-tuned?

Yes, with no license restriction. QLoRA through Unsloth fine-tunes the 31B with as little as 16GB VRAM. Full fine-tuning needs roughly 80GB. Supported on Google Colab, Vertex AI, Hugging Face TRL and consumer GPUs.

Can Gemma 4 be used for agentic AI workflows?

Yes, and this is where it improved most in 2026. Native function calling, JSON structured output, system instructions and configurable thinking modes, plus July's tool-calling reliability patches and Flash Attention 4 prefill gains that matter when every agent turn re-reads a long tool schema. Compatible with Anthropic's MCP and Google's WebMCP.

Which Gemma 4 model should I use?

Most developers: the 26B A4B MoE. Phones and IoT: E2B. Laptops: E4B. Multimodal work including audio on a 12GB to 16GB GPU or Apple Silicon: the 12B Unified. Maximum quality with 20GB or more VRAM: 31B Dense. Android development: the copy inside Android Studio Quail 4.

What is the difference between Gemma 4 and Gemini?

Gemini is Google's proprietary cloud family, accessed by API and iterating fast: Gemini 3.7 Flash shipped in August 2026 alongside Gemini 3.5 Transcribe and Gemini Omni 1.1 Flash. Gemma 4 is the open-weight family built from the same research, designed to run on your own hardware under Apache 2.0. Gemini gives you frontier capability as a service; Gemma 4 gives you ownership, offline operation and full data privacy.

What is the best open source AI model in September 2026?

It depends on your hardware. For anything running on a phone, laptop, single consumer GPU or workstation, Gemma 4 is the strongest all-round family. For text-only local coding at the 27B tier, Qwen 3.6 remains a community favourite. For ultra-long context, Llama 4 Scout leads at 10M tokens under Meta's license. For data-centre scale open weights, Qwen3.8-Max is the largest available, though text-only and licensed with revenue sharing.

19 - Bottom Line

The Bottom Line on Gemma 4 in September 2026

Six months after launch, the interesting thing about Gemma 4 is not any single benchmark. It is that the family kept shipping while everyone was watching the cloud models. A fifth size in June. A quiet checkpoint refresh in July that made tool calling meaningfully more reliable. A billion downloads in August. A first-party IDE bundling it in September. That is a maintained platform, not a launch event.

The strategic picture also clarified. When Qwen's flagship open weights moved to a custom license with revenue sharing, and Llama kept its user cap, Gemma 4 became the only major family combining unrestricted Apache 2.0 terms, hardware coverage from phone to workstation, image input on every size and audio on three. If you are choosing an open model to build a product on rather than to benchmark, that combination is the reason to pick it.

Be clear-eyed about the limits: a January 2025 knowledge cutoff, no audio on the two largest sizes, 256K of context rather than millions, and an operational cost to self-hosting that a spreadsheet comparing token prices will not show you. Those are planning constraints, not deal breakers, and knowing them upfront is what separates a deployment from a demo.

At Auriga IT, we help businesses turn model releases into working systems: choosing the right size for the hardware you have, wiring open models into real applications, and running them on infrastructure that holds up.

Build Smarter With Gemma 4 and Open AI

Whether you are evaluating open models, building agents on MCP, deploying private on-device intelligence, or working out whether self-hosting actually pencils out for your volume, our team can help you get from evaluation to production.

Talk to Our AI Experts →
Gemma 4 Guide
Auriga IT

Gemma 4 by Google: Specs, Benchmarks for All 5 Model Sizes & How to Run It Locally  ·  © 2026 Auriga IT  · 

Related content

Stay Close to What We’re Building

Get insights on product engineering, AI, and real-world technology decisions shaping modern businesses.

suman yubraj
suman yubraj
Suman Yubraj is a Technical Writer at Auriga IT with a background in computer science and content writing. He translates complex technical topics into clear, accessible content for developers and business audiences alike.
Go to Top