Google Gemma 4
Google DeepMind open-weight multimodal LLMs (E2B–31B) under Apache 2.0: reasoning, agents, 256K context, free weights, local + Vertex AI.
Pricing
Contact Sales
open_source
Category
AI Models
0 features tracked
Quick Links
Overview
Gemma 4 is Google DeepMind’s open-weight model family, released around 2 April 2026 (docs list core sizes from 31 March 2026). It is built from the same research stack as Google’s proprietary Gemini 3 line and is positioned as Google’s highest intelligence-per-parameter open release to date. Unlike earlier Gemma generations (custom Gemma Terms of Use), Gemma 4 ships under a commercially permissive Apache 2.0 license—no MAU caps, no royalty for commercial products when you self-host the weights.
The family targets three deployment bands: ultra-edge (Effective 2B / 4B), workstation / local-server (12B unified, 26B MoE, 31B dense), and cloud production (Vertex AI, Cloud Run, GKE, third-party APIs). Google reports more than 400 million cumulative Gemma downloads and a “Gemmaverse” of over 100,000 community variants. You try the larger models in Google AI Studio, download weights from Hugging Face / Kaggle / Ollama, or run managed serving on Google Cloud.
Quick start
Chat free in AI Studio with gemma-4-31b-it or gemma-4-26b-a4b-it. Local: ollama pull gemma4 (or a size tag like gemma4:e4b / gemma4:31b). Weights: Hugging Face collection google/gemma-4 or Kaggle publisher Google.
Key features
- Five core sizes (mid-2026) — E2B and E4B (effective ~2B / ~4B with Per-Layer Embeddings for mobile), 12B Unified (encoder-free multimodal, June 2026), 26B A4B MoE (~3.8–4B active of ~26B total), and 31B Dense. Match size to phone, laptop, or single H100-class GPU.
- Apache 2.0 open weights — Download, fine-tune, and ship commercially without the older Gemma license friction. Industry commentary treated the license change as the biggest adoption unlock versus Gemma 3.
- Advanced reasoning + thinking modes — Configurable thinking for multi-step math, science, and planning. Official thinking-mode numbers (as of ~2 Apr 2026): 31B IT Thinking hits 89.2% on AIME 2026 (no tools), 84.3% GPQA Diamond, 80.0% LiveCodeBench v6, 1452 Arena AI text Elo (#3 open).
- Agentic building blocks — Native function calling, structured JSON, system-role prompts, and improved instruction following for tool-using agents and automation pipelines.
- Multimodal input — Text, image (variable resolution), and video on the family; native audio on E2B, E4B, and 12B. Strong OCR / chart-style visual tasks on larger sizes.
- Long context — 128K on edge (E2B/E4B); up to 256K (often listed as 262K on API hosts) on medium/large models for repos, long docs, and multi-turn agents.
- 140+ languages — Multilingual training for global products beyond pure translation use cases.
- Multi-token prediction (MTP) — Draft/assistant models for speculative decoding (MTP release mid-April 2026) to raise tokens/sec without quality loss when the stack supports it.
- Official QAT builds — Quantization-aware training checkpoints (GGUF Q4_0, w4a16, mobile-optimized) for llama.cpp, LM Studio, vLLM/SGLang, and on-device LiteRT-LM—better quality retention than naive post-training quant.
- Day-one ecosystem — Hugging Face Transformers/TRL, Ollama, llama.cpp, vLLM, SGLang, MLX, LM Studio, Unsloth, NVIDIA NIM/NeMo, Docker, MaxText, Keras, Android AICore / ML Kit GenAI, Vertex AI Model Garden.
Pricing
Gemma 4 is primarily an open-weight product: the model files are free. You pay only for your own compute (or a third-party host). There is no Google “Gemma Pro subscription.” Approximate economics mid-2026:
| Path | What you pay | Notes |
|---|---|---|
| Self-host weights | $0 model fee | GPU/TPU, power, ops only. Apache 2.0 commercial use. |
| Google AI Studio | Free tier / Google AI usage rules | Fast try of 31B and 26B MoE; rate limits apply. |
| Vertex AI / Cloud Run / GKE | Cloud compute + serving | Self-deploy from Model Garden; pay for GPUs/TPUs and platform usage—not a flat model license. |
| OpenRouter 26B A4B | ~$0.06 in / ~$0.33 out per 1M tokens | Provider prices vary; blended third-party rates often ~$0.10–$0.70 / 1M blended. |
| OpenRouter 31B IT | ~$0.12 in / ~$0.35 out per 1M tokens | Some free rate-limited endpoints exist; paid providers differ slightly. |
| DeepInfra / Cloudflare / others | From ~$0.07–$0.14+ in depending on host | Shop blended cost and latency; 26B MoE is widely mirrored. |
Memory floor (official approximate load, weights only, +~20% overhead table) — BF16: E2B ~11.4 GB, E4B ~17.9 GB, 12B ~26.7 GB, 26B A4B ~57.7 GB, 31B ~69.9 GB. Q4_0: roughly 2.9 / 4.5 / 6.7 / 14.4 / 17.5 GB. Mobile LiteRT builds can land E2B near ~1 GB. Context (KV cache) is extra—256K at high batch can dominate VRAM.
Watch out: The 26B MoE only activates ~4B params per token but still needs nearly full 26B weights in memory for routing. Do not size GPUs as if it were a dense 4B model.
Limits & gotchas
- Not Gemini 3 — Open weights track Gemini research, not full proprietary Gemini quality, tools, or Google Search grounding. Expect a clear gap on hardest long-horizon agent jobs versus Claude / Gemini Pro-class APIs.
- Tool-call / JSON friction — Official support is real, but LocalLLaMA / HN reports (especially early 26B MoE and some 12B harnesses) describe malformed tool JSON, template mismatches, and silent schema stripping. Fix path: correct Jinja chat template, updated llama.cpp/Ollama, and sometimes output sanitizers.
- Quant + stack versioning — Older runtimes produced empty/dashed output on 31B or broken tool parsers. Prefer current Ollama, official QAT GGUFs, and Unsloth/HF collections over random quants.
- Safety refusals — Some local users (e.g. Codex CLI threads) find Gemma 4 stricter on medical/sensitive prompts than other open models. Fine-tunes and system prompts help within policy; compliance is still your responsibility.
- Vision quality scales with size — Edge E2B/E4B vision is weaker than 26B/31B; for OCR-heavy product features, budget the larger models or a dedicated vision stack.
- Fine-tune VRAM — Full-precision fine-tuning needs far more memory than inference; use LoRA/QLoRA (Unsloth, TRL, Vertex custom jobs) for practical workstation training.
- Hosted rate limits & price drift — Free AI Studio / free OpenRouter routes are for exploration. Production needs paid providers or your own GPUs with SLA monitoring.
- License history — Only Gemma 4 is Apache 2.0 by default; older Gemma 1–3 weights may still carry Gemma Terms—check each artifact you ship.
Community sentiment
Hacker News launch threads (thousands of points across the DeepMind announcement, local Codex experiments, and the June 12B unified post) largely celebrate Apache 2.0 and intelligence-per-parameter. Recurring praise: 26B MoE as a speed/quality “outlier in its weight class,” 31B as a new local baseline for coding and instruction following, strong structured extraction and pipeline/automation behavior versus some Qwen variants.
r/LocalLLaMA is more operational: day-one Ollama/MLX enthusiasm on Apple Silicon, plus weeks of chat-template and tool-call debugging. Consensus mid-2026 is that Gemma 4 is “good enough to replace many GPT-4o-class calls locally” when the harness is configured correctly—not that it wins every creative or long-agent contest against the largest Chinese MoEs or closed frontier models. Safety filtering and occasional “went off the rails” agent runs remain common caveats.
Apache 2.0 + real local quality is the story; treat tool-calling as a harness problem until your stack’s Gemma 4 template is known-good.
Who should use it
- Local-first developers — Want a strong coding/assistant model on a laptop or single workstation GPU without per-token bills.
- Startups shipping product features — Need commercial-safe open weights under Apache 2.0 for on-prem or customer VPC.
- Mobile / edge teams — E2B/E4B + LiteRT / AICore for offline multimodal agents on phones, Raspberry Pi, Jetson-class devices.
- Enterprises on Google Cloud — Prefer Vertex / GKE / Sovereign Cloud with Google-backed model cards and security posture.
- Researchers & fine-tuners — Domain adaptation (language, science, agents) with Unsloth, TRL, MaxText, or Vertex training jobs.
- Not ideal if — You need maximum closed-frontier reliability with zero harness work, 1M+ context out of the box, or zero-ops managed agents with deep product integrations (use Gemini / Claude / GPT APIs instead).
Alternatives
- Gemini — Google’s proprietary API stack when you want Search grounding, longest context, and managed multimodal products over self-host control.
- Mistral AI — European open + API lab; strong coding/agent models and EU deployment story under Apache-friendly open lines.
- Meta Llama — Huge ecosystem and long-context MoEs; watch Meta’s license terms and MAU-style commercial conditions versus Apache 2.0.
- Qwen — Often preferred on LocalLLaMA for raw coding creativity and throughput; compare carefully on instruction precision and format adherence.
- DeepSeek — Aggressive API pricing and large open MoEs; different data-residency and ops tradeoffs.
- Ollama — Not a model competitor: the easiest local runner for
gemma4tags on Mac/Linux.
Verdict
Gemma 4 is the 2026 open-model release that finally made Google’s lightweight family commercially boring in a good way: Apache 2.0, real multimodal agent features, and sizes that map cleanly from phone to single-GPU server. The 26B MoE is the practical default for latency-sensitive local and API-mirrored workloads; the 31B dense is the quality ceiling when VRAM allows; E2B/E4B own offline edge. Budget time for chat templates, quant choice, and tool-call hardening—then Gemma 4 is one of the best “run it yourself” foundations available without negotiating a custom model license.
Alternatives
Best Alternatives to Google Gemma 4
Head-to-Head
Compare Google Gemma 4 Side-by-Side
More in AI Models