Özer Cem KELAHMETKELAHMET
Articles · Open models

Gemma 4 in late 2026: five sizes, Apache 2.0, EmbeddingGemma 2 and how to choose one

Gemma 4 is Google's open-weight family, and since April it has shipped under Apache 2.0. Eight months on it spans five sizes, a new encoder-free 12B model and a second-generation embedding model. This guide explains how the models differ, what they need and how to run them.

Download Markdown
At a glance
Reading time
16 min
Sections
10
Code examples
4
Tables
2
Sources
10
Published
24 Nov 2026
In 30 seconds
What changed
Google releases Gemma 4 under Apache 2.0
Why it matters
Gemma 4 covers a range no single model can: a phone-sized model with audio input, a mid-size model that reads images and audio with one network, a fast mixture of experts and a dense model for quality.
What to do
Pick by memory first

Most open-model news this autumn has been about giants: trillion-parameter mixtures of experts that need a rack of GPUs. Gemma 4 sits at the other end. Google's open family tops out at 31 billion parameters, and its largest models fit on a single 80 GB GPU in full precision, according to Google. The smallest run on a phone.

Two things make Gemma 4 worth a fresh look in late 2026. First, it is the first Gemma generation under the OSI-approved Apache 2.0 licence, which removes the custom terms that came with earlier Gemma models. Second, the family has kept growing after launch: a multi-token prediction add-on in April, an encoder-free 12B Unified model in June and EmbeddingGemma 2 in October.

This guide covers every current Gemma 4 model, how the architectures differ, what each needs in memory, what the licence allows and how to run them. For the 1M-token open models from Moonshot, Z.ai and MiniMax, see our comparison of how open models reach 1M tokens.

What happened

Google releases Gemma 4 under Apache 2.0 (2 April 2026)

Google announced four Gemma 4 models: Effective 2B (E2B), Effective 4B (E4B), a 26B mixture-of-experts model that activates about 3.8B parameters per token, and a 31B dense model. Google's blog calls them "our most intelligent open models to date". Google's open source blog says they are "the first in the Gemmaverse to be released under the OSI-approved Apache 2.0 license". Google's release log dates the release to 31 March.

Multi-token prediction arrives (16 April 2026)

Google's release log lists Gemma 4 Multi-Token Prediction (MTP) for E2B, E4B, 26B A4B and 31B. Google's Gemma 4 page says MTP supports speculative decoding on all models, a way to generate several tokens per step and so speed up output.

Gemma 4 12B Unified (3 June 2026)

A fifth size arrived: a 12B model that reads images and audio without separate encoder networks. It projects raw image patches and audio waveforms straight into the language model's input space through small linear layers.

EmbeddingGemma 2 (6 October 2026)

Google released a second-generation embedding model that turns text, images and audio into vectors for search and retrieval. It is also Apache 2.0.

The Gemma 4 line-up today

All figures below come from Google's Gemma 4 model card and Gemma 4 page. Gemma 4 is mainly a download-and-run family. On the Gemini API it is offered in the free tier only: Google's pricing page shows input and output as free, and lists the paid tier as "Not available". Third-party hosts charge their own rates; Artificial Analysis lists a median of $0.15 input and $0.40 output per million tokens for the 31B in non-reasoning mode.

Table 1. The Gemma 4 line-up today
Model Parameters Layers Context Inputs → output Weights memory (BF16 / 8-bit / Q4_0) Price Licence
Gemma 4 E2B 5.1B with embeddings; 2.3B effective 35 128K Text, image, audio → text 11.4 / 5.7 / 2.9 GB Free weights; Gemini API free tier Apache 2.0
Gemma 4 E4B 8B with embeddings; 4.5B effective 42 128K Text, image, audio → text 17.9 / 8.9 / 4.5 GB Free weights; Gemini API free tier Apache 2.0
Gemma 4 12B Unified 11.95B 48 256K Text, image, audio → text 26.7 / 13.4 / 6.7 GB Free weights; Gemini API free tier Apache 2.0
Gemma 4 26B A4B 25.2B total; 3.8B active 30 256K Text, image → text 57.7 / 28.8 / 14.4 GB Free weights; Gemini API free tier Apache 2.0
Gemma 4 31B 30.7B dense 60 256K Text, image → text 69.9 / 34.9 / 17.5 GB Free weights; Gemini API free tier; hosts median $0.15 / $0.40 Apache 2.0
EmbeddingGemma 2 740M total n/a 8,192 Text, image, audio → vector n/a Free weights Apache 2.0

The memory column is for weights only. Google's page notes that the KV cache for long contexts adds memory on top, and that the 26B A4B must load all its parameters even though it uses only 3.8B per token.

Google's page also lists video as an input across the family, and the model card caps video at 60 seconds at one frame per second and audio clips at 30 seconds. All models support configurable thinking, function calling and system prompts, and share a 262K-token vocabulary.

How the five models differ inside

The five sizes are not just the same design scaled up. Each uses a different trick to trade memory, speed and quality. Understanding them makes the choice easier.

Sliding-window attention with global layers

Every Gemma 4 model mixes two kinds of attention layer. Local layers only look at a recent window of tokens: 512 tokens in E2B and E4B, 1,024 in the larger models. Global layers look at the whole context, and the final layer is always global, according to the model card.

An everyday comparison: when you read a novel, most sentences only need the last page to make sense, but now and then you must remember a name from chapter one. Local layers handle the last page cheaply. Global layers handle chapter one. Because local layers keep only a short window in the KV cache, memory for long contexts grows mainly with the number of global layers, not all of them.

The model card says global layers use unified keys and values and a positional scheme called Proportional RoPE (p-RoPE). Our guide to RoPE scaling explains why position encoding matters when context windows grow.

Per-layer embeddings in E2B and E4B

The two small models use Per-Layer Embeddings (PLE). Each decoder layer gets its own small embedding for every token. These tables are large in count but cheap to use, because they are looked up rather than multiplied. That is why E2B has 5.1 billion parameters including embeddings but behaves like a 2.3-billion-parameter model when it runs.

Think of a large reference book that you consult by page number. Owning the book takes shelf space, but looking up a page is quick. The embedding tables are the book: they take storage but add little compute. On phones, they can sit in slower storage while the core model stays in fast memory.

A mixture of experts in the 26B A4B

The 26B A4B is a mixture-of-experts model with 128 experts, of which 8 are active per token, plus one shared expert that every token uses. It has 25.2 billion parameters but uses only 3.8 billion per token.

The result is a model that is almost as strong as the 31B on many tests but much faster per token. The trade-off is memory: all 25.2 billion parameters must be loaded, so it needs nearly as much memory as the dense 31B.

Encoder-free input in the 12B Unified

Most multimodal models bolt a separate vision encoder (and sometimes an audio encoder) onto the language model. The 26B and 31B use a vision encoder of about 550 million parameters, and E2B and E4B use encoders of about 150 million (vision) and 300 million (audio), per the model card.

The 12B Unified drops the encoders. It turns raw image patches and audio waveforms into the language model's embeddings with lightweight linear projections. This simplifies the model and lets one network learn all three inputs together. It is also the only model above 4B that accepts audio.

Multi-token prediction for faster output

MTP heads let a model propose several next tokens at once, which a verification step then accepts or rejects. This is a form of speculative decoding: if most guesses are right, you get more tokens per forward pass. Google lists MTP for E2B, E4B, 26B A4B and 31B.

Benchmarks: what Google reports and what others measured

Google's model card reports these instruction-tuned results. They are the maker's numbers.

Table 2. Benchmarks: what Google reports and what others measured
Benchmark (Google-reported) 31B 26B A4B 12B Unified E4B E2B Gemma 3 27B
MMLU Pro 85.2% 82.6% 77.2% 69.4% 60.0% 67.6%
GPQA Diamond 84.3% 82.3% 78.8% 58.6% 43.4% 42.4%
LiveCodeBench v6 80.0% 77.1% 72.0% 52.0% 44.0% 29.1%
AIME 2026 (no tools) 89.2% 88.3% 77.5% 42.5% 37.5% 20.8%
Tau2 (average of 3) 76.9% 68.2% 69.0% 42.2% 24.5% 16.2%
MRCR v2 8-needle 128K 66.4% 44.1% 43.4% 25.4% 19.1% 13.5%

Two patterns stand out. The jump from Gemma 3 is large on reasoning and agent tasks: Tau2 rises from 16.2% to 76.9% for the top model. And long-context retrieval (MRCR) drops sharply below the 31B, so if your task needs to find several facts across 128,000 tokens, the dense 31B is the safer pick.

Independent evidence is thinner:

  • Arena: Google's launch blog says the 31B ranked third and the 26B MoE sixth among open models on the Arena text leaderboard as of 1 April. That is a snapshot from launch day, reported by Google.
  • Artificial Analysis: its page for the 31B shows a score of 4 on Intelligence Index v5.0.1 in reasoning mode, against a median of 10 for comparable open models, and an output speed of 36 tokens per second.
  • Rival tables: Meta's Muse Glimmer card, which compares against Gemma 4 31B, lists the 31B at 66.6 on SWE-Bench Verified and 85.7 on GPQA Diamond as measured by Artificial Analysis. Rival model cards choose their comparisons, so treat these as a cross-check, not a verdict.

The honest summary: Gemma 4 is strong for its size, but eight months after launch it is no longer near the top of open-model leaderboards. Its case rests on size, licence and multimodality.

EmbeddingGemma 2 for search and RAG

EmbeddingGemma 2 is the companion model for retrieval. Its card lists 740 million parameters in total: a 270-million-parameter text model, a 170-million-parameter vision encoder and a 300-million-parameter audio encoder. It produces 768-dimensional embeddings and supports Matryoshka truncation to 512, 256 or 128 dimensions. Vectors must be re-normalised after truncation.

Matryoshka training means the first dimensions of each vector carry the most meaning, like a summary at the top of a report. You can store the short version for fast search and use the full version to re-rank, as explained in our article on Matryoshka embeddings and rescoring.

Google reports an MTEB Multilingual v2 score of 61.36 (up from 61.15 for version 1) and an MTEB Code v1 score of 78.68 (up from 68.76). Context is 8,192 tokens shared across all modalities. The card's quick start:

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("google/embeddinggemma-2")

query_emb = model.encode("What causes the northern lights?", prompt_name="SearchQuery")
doc_emb = model.encode("The northern lights are caused by charged particles from the sun.",
                       prompt_name="Document")
print(model.similarity(query_emb, doc_emb))

How to run Gemma 4

Weights are on Hugging Face, Kaggle and Ollama. Google's blog lists day-one support in Transformers, vLLM, llama.cpp, MLX, Ollama, NVIDIA NIM and LM Studio, and the Gemma page adds SGLang, Keras and LiteRT-LM.

A server with vLLM. The Hugging Face card gives a one-line OpenAI-compatible server:

pip install vllm
vllm serve "google/gemma-4-31B-it"

It answers at http://localhost:8000/v1/chat/completions, so any OpenAI client can call it.

Python with Transformers. The card's example loads the model and turns thinking on or off with a flag:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-31B-it"
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(MODEL_ID, dtype="auto", device_map="auto")

messages = [{"role": "user", "content": "Summarise this contract clause in two sentences: ..."}]
inputs = processor.apply_chat_template(
    messages, tokenize=True, return_dict=True, return_tensors="pt",
    add_generation_prompt=True, enable_thinking=False,
).to(model.device)

out = model.generate(**inputs, max_new_tokens=512)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False))

Set enable_thinking=True for reasoning. The card advises that in multi-turn chats earlier turns should keep only the final answer, except for tool-call turns, where the thinking should stay.

On a laptop. Use a 4-bit GGUF through llama.cpp or Ollama. Google publishes official quantisation-aware training (QAT) checkpoints in GGUF and compressed-tensors formats, which keep more quality at 4 bits than quantising after training. At Q4_0, the 31B needs about 17.5 GB for weights and the E4B about 4.5 GB.

Google's recommended sampling is temperature 1.0, top_p 0.95 and top_k 64.

The licence

Apache 2.0 is the main reason many teams now choose Gemma 4 over models with custom licences. It allows use, modification, redistribution and commercial use, with notice requirements and an express patent licence from contributors. There is no user cap, no revenue threshold and no required "built with" branding.

Google's open source blog gives three reasons for the change, under the headings "Autonomy", "Control" and "Clarity", saying the licence lets developers build "without the need to navigate prescriptive terms of service". Note that this applies to Gemma 4. Older Gemma generations and some specialised variants may carry different terms, so check each model card.

What it means in practice

Gemma 4 covers a range no single model can: a phone-sized model with audio input, a mid-size model that reads images and audio with one network, a fast mixture of experts and a dense model for quality. All of them can be shipped inside a commercial product without a licence negotiation.

It is not the strongest open family any more. For hard coding or long agent runs, larger open models score higher. But for on-device features, private deployments on a single GPU, multimodal input and fine-tuning on your own data, Gemma 4 remains one of the simplest choices.

What to do now

  1. Pick by memory first. Check your GPU or device memory against the Q4_0 and 8-bit figures, leaving room for the KV cache.
  2. Use the 31B for long documents. Its MRCR score at 128K is far above the smaller models, so do not downsize for multi-fact retrieval.
  3. Try the 26B A4B when speed matters. It uses 3.8B parameters per token, so it answers faster than the 31B at similar memory cost.
  4. Choose E2B or E4B for phones and edge devices. Google publishes mobile-optimised QAT builds for these two, and both accept audio.
  5. Test the 12B Unified for mixed audio and images. It handles both without separate encoders and offers 256K context.
  6. Use QAT checkpoints for 4-bit. Prefer Google's official QAT GGUF files over community quantisations made after training.
  7. Pair it with EmbeddingGemma 2 for RAG. Store 256-dimension vectors for search and re-rank with the full 768 dimensions.
  8. Keep thinking off for simple tasks. Turn on enable_thinking only where reasoning improves results, since it costs tokens and time.
  9. Run your own evaluation. Google's numbers are self-reported; test on 50 to 100 examples from your own workload before you commit.

Risks and open questions

Leaderboard position has slipped. Artificial Analysis now places the 31B below the median of comparable open models on its current index. Expect newer open models to beat it on raw capability.

Knowledge is dated. The model card gives a pre-training data cutoff of January 2025. Pair the models with retrieval for anything recent.

Benchmarks are mostly Google's. Independent measurements exist but are fewer, and the Arena rankings Google cites date from launch day.

Memory for long context is easy to underestimate. The published memory figures cover weights only. A 256K context can add a large KV cache on top.

Watch next: whether Google ships a Gemma 4 refresh or a new generation, independent leaderboard entries for the 12B Unified, wider hosted pricing beyond the Gemini API free tier, and how EmbeddingGemma 2 performs on independent retrieval tests.

Frequently asked questions

Is Gemma 4 really open source?

Gemma 4 is released under Apache 2.0, an OSI-approved open-source licence, and Google says it is the first Gemma generation to use it. You get the weights and broad rights to use, change and redistribute them, though Google has not published the training data.

Which Gemma 4 model should I start with?

If you have a 24 GB GPU, start with the 31B at 4 bits, which needs about 17.5 GB for weights. For speed, try the 26B A4B. For phones or small devices, use E2B or E4B.

Can Gemma 4 understand audio?

Yes, but only E2B, E4B and the 12B Unified accept audio. The 26B A4B and 31B accept text and images. The model card caps audio clips at 30 seconds.

How much does Gemma 4 cost through an API?

On the Gemini API, Gemma 4 is listed in the free tier, with the paid tier marked as not available. Third-party hosts set their own prices; Artificial Analysis lists a median of $0.15 input and $0.40 output per million tokens for the 31B in non-reasoning mode.

What is the difference between E2B and a normal 2B model?

E2B uses Per-Layer Embeddings, so it stores 5.1 billion parameters including embedding tables but runs with an effective 2.3 billion. The tables are looked up rather than computed, so they add storage but little compute.

Summary

Gemma 4 is Google's open-weight family under Apache 2.0, announced on 2 April 2026 and extended with multi-token prediction in April, a 12B Unified model in June and EmbeddingGemma 2 in October. Its five sizes use different designs: per-layer embeddings in E2B and E4B, an encoder-free 12B, a 128-expert mixture in the 26B A4B and a dense 31B, all with sliding-window attention mixed with global layers. Google's benchmarks show large gains over Gemma 3, while independent indexes now place the 31B below newer open models. The family's strengths are its permissive licence, multimodal input and modest hardware needs, from about 2.9 GB for E2B at 4 bits to a single 80 GB GPU for the 31B in full precision.

Sources

Cite this article

Kelahmet, Ö. C. (2026, November 24). Gemma 4 in late 2026: five sizes, Apache 2.0, EmbeddingGemma 2 and how to choose one. Özer Cem KELAHMET. https://www.ozercemkelahmet.com/articles/gemma-4-family-guide-sizes-licence

BibTeX
@online{kelahmet2026gemma,
  author = {Kelahmet, {\"O}zer Cem},
  title  = {{Gemma 4 in late 2026: five sizes, Apache 2.0, EmbeddingGemma 2 and how to choose one}},
  year   = {2026},
  month  = {nov},
  url    = {https://www.ozercemkelahmet.com/articles/gemma-4-family-guide-sizes-licence}
}
Version historyfirst version
  1. Published

Factual corrections are listed here with what changed. Wording and formatting edits are not listed.

Last updated Nov 24, 2026
Type to search.
    ↑↓ navigate↵ open