Skip to main content

Gemma 4

Gemma 4
A complete guide to Gemma 4 — 26B MoE parameters, 85 tokens/second on consumer GPUs, Apache 2.0 license, and how it compares to Llama 4 Scout for local deployment.

Gemma 4 is Google DeepMind's family of open-weight, multimodal AI models for reasoning, coding, agentic workflows, and local deployment. The family includes E2B, E4B, 12B, 26B A4B mixture-of-experts, and 31B dense variants. Model size determines context, modality, memory, and latency, so “Gemma 4” is not one interchangeable checkpoint.

The larger variants target personal computers and workstations, while the edge models target mobile and embedded environments. All official Gemma 4 models use Apache 2.0, which is a notable change from earlier Gemma licensing.

> Disclosure: This guide is published by Verdent. Specifications come from Google's official model card. Throughput varies by hardware, precision, context, runtime, and sampling settings; test the exact checkpoint before deployment.

What Is Gemma 4

Gemma 4 combines dense and mixture-of-experts architectures with multimodal input, configurable thinking, function calling, and native system-role support. All variants accept text and images. E2B, E4B, and 12B also support native audio input.

The small models use 128K context windows. The 12B, 26B A4B, and 31B models support 256K. The 26B A4B model contains about 25.2B total parameters but activates roughly 3.8B per token; the 31B model is dense and prioritizes raw quality over MoE inference efficiency.

For coding, Google reports stronger results than Gemma 3 across its official model-card evaluations. The model can generate, complete, and correct code, but repository-level work still depends on a surrounding agent for search, edits, commands, tests, and repair loops.

The 85 t/s Consumer-Hardware Claim Explained

The source-sheet phrase “85 tokens/second on consumer hardware” is not a universal Gemma 4 specification in Google's launch post or model card. Throughput cannot be transferred across GPUs, CPUs, Apple Silicon, quantization formats, context lengths, batch sizes, and runtimes.

For a useful speed claim, report a complete test record:

  • exact checkpoint and revision;
  • BF16, SFP8, Q4, or other precision;
  • hardware and available memory;
  • serving runtime and version;
  • prompt length and generated tokens;
  • batch size and KV-cache settings;
  • time to first token and steady-state tokens per second.

The 26B A4B model is designed for faster inference than a dense model of similar total size because it activates about 4B parameters per token. However, all experts still need to be loaded. MoE reduces compute per token more than it reduces static weight memory.

Treat 85 t/s as a hardware-specific result that requires a reproducible source, not as a fixed Gemma 4 rate.

Gemma 4 vs Gemma 3 vs Llama 4 Scout

Decision factorGemma 4 26B A4BGemma 4 31BGemma 3 27BLlama 4 Scout
ArchitectureMoE, about 26B total / 4B active31B densePrevious-generation dense modelMoE, 109B total / 17B active
Context256K256KPrevious-generation context profile10M
Input modalitiesText and imageText and imageText and imageText and image
LicenseApache 2.0Apache 2.0Check the Gemma 3 terms with the artifactLlama 4 Community License
Key evaluation questionThroughput per unit memoryMaximum Gemma 4 qualityUpgrade value from an existing deploymentExtreme-context and Llama ecosystem fit

Gemma 4 is the natural evaluation path for teams already operating Gemma. Scout becomes relevant when the workload genuinely needs a much larger context window and the Llama license is acceptable. The comparison should use the same repository and visual tasks, not unrelated vendor benchmark tables.

For another Apache-licensed multimodal family with more checkpoint sizes, see Qwen3.5. For a deprecated vision-model migration, see Pixtral Large.

Apache 2.0 License Benefits

Google releases Gemma 4 under Apache 2.0. The license permits broad use, modification, and distribution subject to its conditions, and includes patent language. This simplifies many commercial and internal deployment reviews compared with a custom model community license.

Practical benefits include:

  • local or private-cloud serving;
  • checkpoint customization and fine-tuning;
  • redistribution of compliant derivatives;
  • consistent license treatment across official sizes;
  • integration into open serving stacks.

Licensing does not remove other obligations. Teams should still review third-party dependencies, data handling, acceptable use, product regulation, and the specific model files being shipped. This page is not legal advice.

Local Deployment Guide

Google's current documentation provides approximate static-weight memory estimates with overhead. For the 26B A4B model, it lists about 57.7 GB BF16, 28.8 GB SFP8, and 14.4 GB Q4_0. For 31B, it lists about 69.9 GB BF16, 34.9 GB SFP8, and 17.5 GB Q4_0.

Those figures do not include all KV-cache memory for long contexts or every runtime buffer. A deployment plan should:

ModelApproximate static weightsAdditional capacity to planDeployment starting point
26B A4B57.7 GB BF16 / 28.8 GB SFP8 / 14.4 GB Q4_0KV cache, runtime buffers, context, and concurrencyHigh-memory workstation for quantized trials or server-class accelerator
31B dense69.9 GB BF16 / 34.9 GB SFP8 / 17.5 GB Q4_0KV cache, runtime buffers, context, and concurrencyHigh-memory workstation for quantized trials or server-class accelerator

These are not end-to-end memory requirements. They exclude the full KV cache and some serving overhead, so hardware selection requires a workload-specific memory test.

  1. select 26B A4B for throughput or 31B for the higher-quality baseline;
  2. choose an official or documented checkpoint format;
  3. reserve memory for context, concurrency, and the serving stack;
  4. validate function calls and code quality after quantization;
  5. run representative prompts at the intended context length;
  6. pin the tokenizer, model revision, runtime, and container.

Google documents support across ecosystems including Transformers, vLLM, llama.cpp, MLX, Ollama, and LM Studio. Support details differ by format, so follow the selected checkpoint's model card.

Using Gemma 4 in Verdent

Gemma 4 is not in Verdent's current built-in model list. You may be able to select a hosted Gemma 4 checkpoint through OpenRouter BYOK if it appears for your account. That is conditional provider access, not built-in Google support.

Choose the exact size in the provider list and record whether the endpoint is quantized. Run one local benchmark and one provider benchmark with the same acceptance task; this reveals whether the hosted route preserves the quality and latency you measured locally.

With a validated provider key, a Gemma endpoint can be assigned to Verdent chat or an agent role. The BYOK route excludes Smart Suggestions and automated compression, so the evaluation should include manual context management.

Sources: Plan Gemma 4 memory by checkpoint.

Frequently Asked Questions

Is 85 tokens per second an official universal Gemma 4 specification?

No. Throughput depends on the checkpoint, precision, hardware, runtime, context, batch size, and cache settings. Treat 85 t/s as a reproducible hardware-specific result only when all of those details are provided.

Should a team choose Gemma 4 26B A4B or the 31B dense model?

Start with 26B A4B when throughput per unit of compute is the priority. Evaluate 31B when the acceptance suite shows that the dense model's quality justifies its compute profile.

Why must all 26B weights be loaded if only about 4B parameters are active?

The router selects different experts for different tokens. Only part of the model computes each token, but the serving system still needs the complete expert weight set available.

Do Google's published memory estimates include the full KV cache?

No. The published static-weight estimates do not include the full KV cache or every runtime buffer. Context length and concurrency can therefore add substantial memory demand.

Next Step

Test Gemma 4 access in Verdent

Compare Verdent’s built-in model options with a hosted Gemma 4 endpoint through BYOK. If your provider account exposes Gemma 4, validate latency, quality, and context handling before assigning it to chat or agent workflows.