Join our Newsletter — 33% off our NHI Course
Home› Guides› Gemma 4: Specs, Context Window, Pricing, Benchmarks and…
Guide AI Platforms

Gemma 4: Specs, Context Window, Pricing, Benchmarks and Availability

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 15 November 2026 16 min read
On this page

Gemma 4 is Google DeepMind's fourth generation of open-weight models, released on 31 March 2026 under the Apache 2.0 licence in five sizes: E2B, E4B, 12B Unified, 26B A4B and 31B. This profile goes below the family overview to the level a team needs before it deploys a specific size: architecture per size, thinking-mode mechanics, input limits for audio and video, memory and quantisation options, Gemini API features and pricing, provider-reported benchmarks and what the model card says about safety. Every fact comes from Google's own Gemma documentation, model card, release notes and pricing page, listed under Standards and references. Where Google publishes nothing on a point, the page says so.

Last checked: 2026-11-15.

This is an independent reference page from NHI Mgmt Group based on public provider documentation; it is not sponsored or endorsed by any provider. It uses Google's public Gemma documentation as of November 2026. Model details change, so confirm against Google's current documentation.

Key takeaways

  • Five sizes, two architectures. E2B, E4B, 12B Unified and 31B are dense; 26B A4B is a mixture-of-experts model that activates 3.8B of its 25.2B parameters per token.
  • 128K or 256K tokens of context. E2B and E4B list 128K; 12B Unified, 26B A4B and 31B list 256K. Google does not state a separate maximum output length.
  • Free on the Gemini API, with a data condition. gemma-4-31b-it and gemma-4-26b-a4b-it are free of charge on the free tier, the paid tier is listed as not available, and free-tier content is used to improve Google's products.
  • Audio on three sizes only. E2B, E4B and 12B Unified accept audio clips of up to 30 seconds; 26B A4B and 31B take text, images and video frames.
  • No retirement date applies to the weights. Google lists no deprecation for Gemma 4 on the pages checked (2026-11-15); its ai.google.dev Gemma pages are marked deprecated in favour of gemma.ai.

What is Gemma 4?

Gemma 4 is a family of multimodal, open-weight models from Google DeepMind, published as pre-trained and instruction-tuned checkpoints. Google's pricing page describes it as "Our lightweight, state-of the art, open model built from the same technology that powers our Gemini models".

The model card describes a hybrid attention design that interleaves local sliding-window attention with global attention, with the final layer always global. Global layers use unified keys and values and Proportional RoPE (p-RoPE). The small models use Per-Layer Embeddings (PLE), which give each decoder layer its own small per-token embedding; that is why E2B and E4B carry an "E" for effective parameters. The 12B Unified model, added on 3 June 2026, is encoder-free: raw image patches and audio waveforms are projected straight into the language model through lightweight linear layers. Training data covers web documents in more than 140 languages, code, mathematics, images and audio, with a knowledge cutoff of January 2025. For every Gemma generation and variant, see Google Gemma Models.

Key facts at a glance

As of 2026-11-15. Source: Gemma 4 model card, Gemma models overview, Gemma releases page, Gemini API change log and pricing page.

FieldValueSource
ProviderGoogle DeepMindModel card
SizesE2B, E4B, 12B Unified, 26B A4B (mixture of experts), 31B (dense)Model card
API IDsgemma-4-31b-it, gemma-4-26b-a4b-it (Gemini API); other sizes are open weights onlyGemma on the Gemini API page
Release date2026-03-31 (E2B, E4B, 31B, 26B A4B weights); 2026-04-02 (Gemini API); 2026-06-03 (12B Unified)Releases page; change log
StatusCurrentReleases page
Context window128K (E2B, E4B); 256K (12B Unified, 26B A4B, 31B)Model card
Max outputNot stated by Google on the pages checked (2026-11-15)Model card
Knowledge cutoffJanuary 2025Model card
Input modalitiesText, image and video frames on all sizes; audio on E2B, E4B and 12B UnifiedModel card; gemma.ai models page
Output modalitiesTextModel card
Open weightsYes (Kaggle, Hugging Face)Models overview
LicenceApache 2.0Model card
ParametersE2B 2.3B effective (5.1B with embeddings); E4B 4.5B effective (8B); 12B Unified 11.95B; 26B A4B 25.2B total, 3.8B active; 31B 30.7BModel card
Vocabulary262K tokens (all sizes)Model card
LanguagesPre-trained on 140+ languages; out-of-the-box support for 35+Model card

Architecture by size

As of 2026-11-15. Source: Gemma 4 model card. Sizes listed from smallest to largest.

PropertyE2BE4B12B Unified26B A4B31B
Layers3542483060
Sliding window512 tokens512 tokens1,024 tokens1,024 tokens1,024 tokens
Vision encoderAbout 150MAbout 150MEncoder-free (linear projection)About 550MAbout 550M
Audio encoderAbout 300MAbout 300MEncoder-free (linear projection)No audio inputNo audio input
ExpertsDenseDenseDense128 total, 8 active plus 1 sharedDense

Release and version history

As of 2026-11-15. Source: Gemma releases page and Gemini API change log.

DateEventSource
2026-03-31"Release of Gemma 4 in E2B, E4B, 31B and 26B A4B sizes"Releases page
2026-04-02gemma-4-26b-a4b-it and gemma-4-31b-it released in AI Studio and the Gemini APIChange log
2026-04-16Multi-token prediction (MTP) models for E2B, E4B, 31B and 26B A4BReleases page
2026-06-03"Release of Gemma 4 12B Unified"Releases page
2026-10-06EmbeddingGemma 2 (740M), a multimodal embedding model in the Gemma 4 family on gemma.aiReleases page; gemma.ai models page

The MTP models are draft models for speculative decoding that pair with a matching main model; the models overview lists drafters for every size including 12B. gemma.ai also lists DiffusionGemma, described as "Experimental text diffusion for exceptionally fast generation", without a release date on the releases page.

How much does Gemma 4 cost?

As of 2026-11-15. Price per million tokens on the Gemini API, from Google's pricing page, which lists Gemma 4 as a single entry without per-size prices.

ItemPriceNotesSource
Gemini API free tier: input and outputFree of chargeContent used to improve Google's products: yesPricing page
Gemini API free tier: context caching and storageFree of chargeNonePricing page
Gemini API paid tierNot availableInput, output, caching, storage and tuning all listed as not availablePricing page
Grounding with Google SearchNot available on either tierAs listed in the Gemma 4 pricing entryPricing page
BatchNot stated by Google on the pages checked (2026-11-15)NonePricing page
Open-weight downloadNo licence feeCompute, storage and operation paid by whoever runs the modelModels overview; model card
  • Data condition: the only hosted tier from Google is the free tier, and the pricing page marks free-tier content as used to improve Google's products. Teams that need a no-training condition self-host the weights or use another hosting route with its own terms.
  • Search grounding: the Gemma on the Gemini API page shows a google_search tool example, while the pricing page lists grounding as not available for Gemma 4. Test it on your own key before relying on it.
  • Google Cloud: Google Cloud's open models documentation lists a "Gemma-4-26B-A4B-IT MaaS" managed endpoint alongside self-deployment in Model Garden; its price is not stated on the pages checked (2026-11-15).

See the LLM Pricing Tracker for current hosted prices across providers.

Context window and output limits

Context length depends on size, and Gemma 4 sets its own limits for media inside that context. Running a long context locally needs memory for the KV cache on top of the weight figures in the table below.

LimitValueNotesSource
Context window, E2B and E4B128K tokensSmall modelsModel card
Context window, 12B Unified, 26B A4B, 31B256K tokensMedium modelsModel card
Max outputNot stated by Google on the pages checked (2026-11-15)NoneModel card
Audio clip length30 seconds maximumE2B, E4B and 12B Unified onlyModel card
Video length60 seconds maximum at one frame per secondProcessed as frame sequencesModel card
Visual token budget per image70, 140, 280, 560 or 1,120Lower for classification, captioning and video; higher for OCR and small textModel card
Long-context retrieval (MRCR v2, 8-needle, 128K)31B 66.4%; 26B A4B 44.1%; 12B 43.4%; E4B 25.4%; E2B 19.1%Provider-reportedModel card

Memory needed to load the weights

Approximate GPU or TPU memory for base weights plus 20% overhead, excluding KV cache and fine-tuning. Mobile figures use LiteRT-LM. Source: Gemma models overview.

SizeBF16SFP8Q4_0Mobile (text only)
E2B11.4 GB5.7 GB2.9 GB1.1 GB (0.84 GB)
E4B17.9 GB8.9 GB4.5 GB2.5 GB (2.2 GB)
12B Unified26.7 GB13.4 GB6.7 GBNot stated by Google
26B A4B57.7 GB28.8 GB14.4 GBNot stated by Google
31B69.9 GB34.9 GB17.5 GBNot stated by Google

The 26B A4B model computes like a 4B model but, as the overview notes, all 26B parameters must be loaded. See Mixture of Experts Explained and Context Windows Explained.

Modalities and tools

  • Thinking: in the open weights, thinking is switched on by placing the <|think|> token at the start of the system prompt and off by removing it. With thinking on, reasoning appears in a thought channel before the final answer. With it off, sizes other than E2B and E4B still emit the channel tags with an empty thought block. On the Gemini API, thinking_level "high" enables thinking and "minimal" disables it.
  • Multi-turn handling: previous model turns should carry only the final response, except tool-call turns, where the model card says thinking content is kept.
  • Roles: standard system, user and assistant roles, with native system-role support.
  • Function calling: native structured tool use; on the Gemini API tools are defined as function declarations.
  • Vision: object detection, document and PDF parsing, UI and chart understanding, multilingual OCR, handwriting and pointing, at variable aspect ratios and resolutions; text and images can be interleaved in any order.
  • Audio: speech recognition and speech-to-translated-text on E2B, E4B and 12B Unified, with Google's prompt templates for each.
  • Quantisation-aware training (QAT): checkpoints in GGUF (-qat-q4_0-gguf), compressed-tensors (-qat-w4a16-ct) for vLLM and SGLang, unquantised weights for conversion, and mobile builds (-qat-mobile-transformers, -qat-mobile-ct) for E2B and E4B.

Function calling gives the model the ability to act through other systems. Treat each tool it can call as a credentialed integration with its own scope, and keep human approval on irreversible actions. See the Open-Weight Model Security Guide.

Where is Gemma 4 available?

As of 2026-11-15. Source: Gemma models overview, gemma.ai models page, Gemma on the Gemini API page and Google Cloud open models documentation.

ChannelDetailsSource
Weight downloadsKaggle (google/gemma-4) and the Google Gemma 4 collection on Hugging Facegemma.ai models page
Gemini API and Google AI Studiogemma-4-31b-it and gemma-4-26b-a4b-it with an AI Studio API key, endpoint generativelanguage.googleapis.com/v1betaGemma on the Gemini API page
Google CloudModel Garden self-deployment on GPU or TPU; Gemma-4-26B-A4B-IT MaaS endpoint; Google Kubernetes EngineGoogle Cloud open models docs; models overview
On-device and edgeGoogle AI Edge and LiteRT-LM for mobile and browser; E2B and E4B are aimed at these targetsModels overview; gemma.ai models page
Local runtimes and frameworksllama.cpp, LM Studio, Ollama, MLX, Hugging Face Transformers, Keras, Tunix, Unsloth, vLLM, SGLangModels overview
RegionsNot stated by Google on the pages checked (2026-11-15)Gemma on the Gemini API page

Access restrictions

Gemma 4 is not a restricted-access model. The weights are a public download under Apache 2.0, and the two hosted sizes are available to anyone with a Google AI Studio API key on the free tier. The models overview page also links Google's Gemma Terms of Use and Prohibited Use Policy next to the Apache 2.0 licence for Gemma 4; check with counsel which terms your use falls under. The only hosting-side conditions on the pages checked are the free tier's data use and the paid tier being listed as not available.

Benchmarks (provider-reported, dated)

As of 2026-11-15. All figures are provider-reported by Google in the Gemma 4 model card for instruction-tuned models. Independent leaderboard results are not included because none were checked against their own published pages for this profile. Sizes listed from largest to smallest, as in the card.

Evaluation31B26B A4B12B UnifiedE4BE2B
MMLU Pro85.2%82.6%77.2%69.4%60.0%
AIME 2026 (no tools)89.2%88.3%77.5%42.5%37.5%
LiveCodeBench v680.0%77.1%72.0%52.0%44.0%
Codeforces Elo215017181659940633
GPQA Diamond84.3%82.3%78.8%58.6%43.4%
Tau2 (average of 3)76.9%68.2%69.0%42.2%24.5%
Humanity's Last Exam (no tools)19.5%8.7%5.2%Not reportedNot reported
BigBench Extra Hard74.4%64.8%53.0%33.1%21.9%
MMMLU88.4%86.3%83.4%76.6%67.4%
MMMU Pro76.9%73.8%69.1%52.6%44.2%
MATH-Vision85.6%82.4%79.7%59.5%52.4%
OmniDocBench 1.5 (edit distance, lower is better)0.1310.1490.1640.1810.290

The card also reports Humanity's Last Exam with search at 26.5% (31B) and 17.2% (26B A4B), and MedXPertQA MM from 61.3% (31B) to 23.5% (E2B). See How to Read LLM Benchmarks.

Model card and system card

Google publishes a Gemma 4 model card and a Gemma 4 technical report (Gemma Team, 2026, arXiv:2607.02770). No separate system card is linked on the pages checked (2026-11-15). What the card states:

  • Safety testing: automated and human evaluations by internal safety and responsible AI teams, covering child sexual abuse material, dangerous content, sexually explicit content, hate speech and harassment, run without safety filters.
  • Results: minimal policy violations in text-to-text and image-to-text output across all sizes, with Google stating Gemma 4 improves on Gemma 3 and 3n while keeping unjustified refusals low.
  • Data filtering: CSAM filtering at multiple stages, automated removal of certain personal and sensitive data, and quality and safety filtering.
  • Limitations: output reflects gaps and biases in training data; the model may miss nuance, sarcasm or figurative language, is "not a knowledge base" and can produce incorrect or outdated facts.

See Model Cards and System Cards Explained.

Data handling

  • Self-hosted weights: prompts and outputs stay in the operator's environment; Google receives no inference data from downloaded weights.
  • Gemini API free tier: content is used to improve Google's products, per the pricing page.
  • Gemini API paid tier: listed as not available for Gemma 4, so the paid-tier data condition does not apply to it.
  • Retention, residency and zero data retention for Gemma on the Gemini API: not stated on the Gemma pages checked (2026-11-15).

Self-hosting moves patching, access control and logging to the operator. See the Self-Hosted LLM Security Guide.

Deprecation status

As of 15 November 2026, Google's Gemma releases page, change log and model card list no deprecation or shutdown for any Gemma 4 size or API ID. Downloaded weights do not expire, so the operator decides when to retire them. Monitor gemma.ai and the Gemini API deprecations page rather than relying on this snapshot.

Model or itemDetailsSource
gemma-4-31b-it, gemma-4-26b-a4b-it (Gemini API)No deprecation listed (2026-11-15)Change log
Gemma 4 open weights (all sizes)No deprecation listed (2026-11-15)Releases page
ai.google.dev Gemma documentationMarked "deprecated", with new documentation at gemma.aiModels overview; model card

How Gemma 4 differs from other models in its family

As of 2026-11-15. Source: Gemma 4 model card, models overview and gemma.ai models page. Models listed alphabetically.

ModelParametersContextInputLicencePositioning (Google wording)
DiffusionGemmaNot stated by Google on the pages checked (2026-11-15)Not stated by Google on the pages checked (2026-11-15)TextNot stated by Google on the pages checked (2026-11-15)"Experimental text diffusion for exceptionally fast generation"
EmbeddingGemma 2740MNot stated by Google on the pages checked (2026-11-15)Text, image, audio, videoNot stated by Google on the pages checked (2026-11-15)Multimodal embeddings
Gemma 4 (five sizes)2.3B effective to 30.7B128K or 256KText, image, video; audio on three sizesApache 2.0Multimodal generation with thinking and function calling

Within Gemma 4, the main split is between the small E2B and E4B models with Per-Layer Embeddings and 128K context, the encoder-free 12B Unified model, and the 26B A4B and 31B models with separate vision encoders, no audio and 256K context. The model card uses Gemma 3 27B as its baseline, for example 67.6% on MMLU Pro and 20.8% on AIME 2026 without thinking. For earlier generations, see Google Gemma Models. For self-hosted alternatives from other labs, see Open-Weight Frontier Models Compared.

Practitioner checklist

  • Record the exact size and checkpoint (pre-trained, instruction-tuned, QAT format, MTP drafter) in the AI inventory, with the source repository.
  • Size hardware from Google's memory table plus KV cache for the context length you will actually use, remembering 26B A4B loads all 25.2B parameters.
  • Choose E2B, E4B or 12B Unified when audio input is needed; the 26B A4B and 31B sizes take no audio.
  • Keep confidential or personal data off the Gemini API free tier, where content is used to improve Google's products.
  • Download weights only from Google's Kaggle and Hugging Face accounts and record file hashes.
  • Apply the model card's recommended sampling (temperature 1.0, top_p 0.95, top_k 64), put images before text and audio after it, and strip thoughts from earlier turns except tool-call turns.
  • Add your own content safety layer and human approval on irreversible tool actions, as the card leaves safeguards to developers.
  • Store Gemini API keys in a secrets manager and rotate them. See the LLMjacking Guide.
  • Recheck gemma.ai and the Gemini API change log monthly for new sizes or retirements.

Standards and references

Related NHI Mgmt Group resources: Google Gemma Models, Open-Weight Frontier Models Compared, Open-Weight Model Security Guide, Self-Hosted LLM Security Guide, Frontier AI Models Compared.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 15 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.