Skip to content

Gemma — Google's Open-Weights Flank: Gemma 4 Moves to Apache 2.0, From Mobile to Workstation Full-Size Open Weights

Sep 19, 20261 min
TL;DRGemma is Google's open-weights family paired with the closed-source Gemini flagship; Gemma 4 (E2B / E4B / 26B-MoE / 31B) released in April 2026 switched its license from Google Gemma Terms of Use to Apache 2.0 — the single most important change in this article.
Series: AI Model Families (24 / 12)

On April 2, 2026, Google released Gemma 4 — four sizes (E2B / E4B / 26B-MoE / 31B), with 31B ranking third on the open-source Arena leaderboard. Size and scores are not the real news this time — the license is. Gemma 4 switched to Apache 2.0. Every previous Gemma generation was bound to Google's proprietary Gemma Terms of Use, which required a gated download with login and click-through agreement; starting with Gemma 4, self-hosting, fine-tuning, and commercial redistribution no longer require that step. This is the 24th deep-dive in the "AI Model Families" series, tracing Gemma's complete path from its 2024 debut to Gemma 4, and its division of labor with the Gemini main article.

For how to read benchmark numbers cited here, see our AI model evaluation sources guide. This is part of the AI Model Landscape Overview series.

Family Evolution Timeline

VersionReleaseSizesKey Fact
Gemma 12024-022B / 7BFirst open weights derived from Gemini technology; Gemma Terms of Use
Gemma 22024-069B / 27B27B first open-weight model near flagship tier
Gemma 32025-031B / 4B / 12B / 27BMultimodal enters open-weights line; 270M ultra-small added later
Gemma 3n2025-06E2B / E4BMatFormer + selective parameter activation; first mobile-first generation
Gemma 42026-04E2B / E4B / 26B-MoE / 31BLicense switched to Apache 2.0; native function calling and agent workflow support

Two years, five generations. Gemma's core line has always been simple: repackage Gemini-generation research as downloadable, self-hostable open weights. Size floor keeps dropping (7B → 2B → 1B → 270M → E2B), ceiling keeps rising (7B → 27B → 31B), with vertical variants (medical, vision, safety, function-calling, embedding) in between — but only Gemma 4 changed the license. Understanding that split is the key to reading the entire family.

Variant positioning in one sentence: MedGemma (medical text + image understanding), ShieldGemma 2 (content safety classifier), FunctionGemma (edge function calling), EmbeddingGemma (300M on-device embedding), PaliGemma (vision-language). Full official variant list: DeepMind Gemma page.

The License Trap: Gemma 4 Is Apache 2.0; Previous Generations Are Not

This is the most important section of the entire article — it is easy to confuse. Even the Gemini main article once wrote the Gemma open-weights line as Apache 2.0 in one line. The precise split:

Gemma 1 / 2 / 3 / 3nGemma 4
LicenseGemma Terms of Use (Google proprietary)Apache 2.0 (plus a separate prohibited-use policy)
Download methodGated on Hugging Face; login + click-through agreement requiredStandard open-source download, no click-through
Hugging Face taglicense:gemma (e.g. google/gemma-3n-E2B-it)apache-2.0
Redistribution after fine-tuningBound by original termsHandled under Apache 2.0

Three practical implications:

First, how to identify. On Hugging Face, license:gemma means the old license; apache-2.0 means the Gemma 4 generation. Do not treat "Gemma = open source" as a blanket statement — redistribution and commercial terms differ completely.

Second, Apache 2.0 is not zero restrictions. Gemma 4 carries a separate prohibited-use policy, and Google's trademarks are not covered by the license. In compliance reviews, read both the license page and the prohibited-use policy together.

Third, old projects are not retroactively covered. Existing Gemma 2 / 3 weights do not automatically become Apache 2.0 just because Gemma 4 switched. To change the licensing basis, you must actually switch to Gemma 4-generation weights and re-run evaluation — changing the model is the fastest way to break prompts, especially JSON formatting instructions that rely on few-shot examples or specific phrasing.

Three Deployment Paths: Workers AI, Self-Hosted, Mobile AI Edge

Gemma 4's size matrix maps to hardware: E2B / E4B target mobile and IoT (extreme compute / memory efficiency), while 26B / 31B target "frontier intelligence on a personal computer." Official description: DeepMind Gemma page. Three deployment paths:

Path 1: Workers AI (Simplest)

Workers AI hosts only gemma-4-26b-a4b-it: 256K context, Vision, Function calling, and Reasoning all enabled; priced at $0.10 / $0.30 per M input / output tokens. The MoE activates about 3.8B parameters per inference, so latency is actually better than previous dense 12B generations. Our site already has a practical record — Gemma on Cloudflare Workers AI — covering the full migration from Gemma 3 to Gemma 4, including RAG pipeline prompt retesting.

Three boundaries to remember: 31B is only available via AI Studio / Gemini API, not Workers AI; the old gemma-3-12b-it was marked deprecated on 2026-05-30 — do not start new projects with it; @cf/aisingapore/gemma-sea-lion-v4-27b-it is AI Singapore's Southeast Asian language variant built on Gemma — note the @cf/aisingapore prefix, not @cf/google. Full Workers AI model comparison: Workers AI model catalog.

Path 2: Self-Hosted (Ollama / vLLM — For Sovereignty)

This is where Apache 2.0 truly delivers value: weights downloadable from day one via Ollama, vLLM, llama.cpp, and Hugging Face Transformers. Official specs: unquantized bfloat16 fits in a single 80GB H100; quantized versions run on consumer-grade GPUs, supporting IDE coding assistants and agent workflows. If you need fine-tuning sovereignty, data that must stay on-premise, or long-term checkpoint locks (hosted API versions are opaque and can change without warning), take this path.

Path 3: Mobile AI Edge (E2B / E4B — Another Battlefield)

E2B / E4B are designed for offline use: 128K context (256K for larger lines), native image processing across the family, and native speech input for E2B / E4B. Running fully offline on Android, Raspberry Pi, and Jetson Orin Nano via AICore, ML Kit, and LiteRT. Our mobile small-model overview has a full comparison of this line. In brief: only go off-cloud to touch E2B / E4B if you need offline execution, low latency, and power efficiency.


Division of Labor vs. Gemini: Closed-Source Flagship vs. Open-Weights Flank

Gemma and Gemini's relationship is Google's dual-track approach: Gemini earns revenue; Gemma builds ecosystem. See the Gemini main article — the closed-source flagship (1M context, native multimodal, $2/$12) runs only on Google infrastructure; Gemma is the retreat path for developers who need self-hosting, fine-tuning, or data sovereignty. It is explicitly not the frontier. Gemma 4's Apache 2.0 makes that retreat path genuinely open for the first time, but the "open-weights flank" positioning has not changed: if you need the strongest model, go back to Gemini 3.1 Pro.

In the open-weights competitive landscape:

  • Against Qwen (AI Model Family article): Qwen has the widest size coverage and highest Hugging Face download count, but its Max-tier weights switched to a custom license rather than Apache 2.0 in August 2026 — so Gemma 4 currently leads on "license purity." Qwen's advantages remain in Chinese ecosystem coverage and coding / vision specialist model lines.
  • Against Llama (AI Model Family article): Llama 4 may be the last major open-source Llama release; Meta has shifted focus to the closed-source Muse Spark. The open-weights ground is changing hands — Gemma 4's Apache 2.0 arrives at exactly the right time.
  • Against DeepSeek: MIT license plus frontier-level quality remains the ceiling for self-hosted cost-performance; Gemma's differentiation is Google's multi-language coverage (including Traditional Chinese) and the end-to-end deployment matrix (cloud → workstation → mobile in one line).

What This Means for Agent Developers

  • Traditional Chinese RAG within the Cloudflare ecosystem → Workers AI gemma-4-26b-a4b-it: 256K context, $0.10/$0.30, native Vision + Function calling support; details in our Gemma practical guide
  • Need 31B quality without self-hosting → AI Studio / Gemini API gemma-4-31b-it: third on the open-source Arena leaderboard (official blog April data)
  • Need fine-tuning sovereignty or locked checkpoints → Self-hosted Gemma 4 (Apache 2.0); Ollama / vLLM support from day one; previous Gemma 2/3 gated licenses do not apply
  • Offline mobile agent → E2B / E4B + AI Edge; 128K context; native speech input
  • Southeast Asian multilingual → Evaluate SEA-LION variant (@cf/aisingapore prefix); Traditional Chinese mainstay is still Gemma 4 core
  • Frontier reasoning / coding → Not Gemma's battlefield; see the Gemini main article for 3.1 Pro or 3.8 Flash
  • License audit → Check the Hugging Face license tag first (gemma vs apache-2.0), then the prohibited-use policy; switching licensing basis for an old project means switching the model, and prompts must be re-tested

Overall

Gemma's story is "open weights in exchange for ecosystem position." Google does not expect Gemma to win the frontier race — that is Gemini's job. Gemma's role is to make Google models present where Google infrastructure cannot reach: other people's clouds, self-hosted servers, phones. Gemma 4's Apache 2.0 turns that marketing line into a legal reality: before Gemma 4, Gemma was technically a "downloadable proprietary model" rather than open source. Now it is genuinely open.

The limitations are equally clear: 31B, however strong, is not frontier (third on the Arena open-source leaderboard means two ahead of it); 64K-level output limits remain; scientific reasoning and coding benchmarks fall well behind Gemini 3.1 Pro. If your scenario demands the strongest model, Gemma has never been the answer; if your scenario demands "strong enough, self-hostable, with a clean license," Gemma 4 is the first generation where Google genuinely delivers.


References