Gemma 4 31B

Google DeepMind's 31B open-weight reasoning model: 262K context, Apache 2.0 license.

Released April 2026, Gemma 4 31B packs Google DeepMind's reasoning power into an open-weight package with a 262K-token context window and class-leading GPQA Diamond and AIME 2026 scores. It's built for self-hosted document analysis and research work, not autonomous coding agents, where it trails rival open models like Muse Glimmer.

Gemma 4 31B, Google DeepMind's open-weight model released April 2026, scores 85.2% on MMLU Pro and leads most 30B-class open rivals on core reasoning benchmarks. It trails agentic tool-use leaders like Muse Glimmer, and ships under an open license with a large context window suited to long documents.

Provider: Google DeepMind · Family: Gemma

More about Google DeepMind on HokAI

Context window: 262,144 tokens

Input modalities: text, image · Output: text, tool-calls

About Gemma 4 31B

Gemma 4 31B is Google DeepMind's open-weight model in the Gemma line, released April 2, 2026. It is a 30.7-billion-parameter dense transformer with native multimodal input, positioned as DeepMind's self-hostable counterpart to its closed Gemini API models rather than a replacement for them. On DeepMind's own published evaluation suite, Gemma 4 31B scores 85.7% on GPQA Diamond, 89.2% on AIME 2026, 85.2% on MMLU Pro, and 80.0% on LiveCodeBench v6, ranking third on the LM Arena leaderboard among evaluated models at launch. Multimodal document and chart understanding reaches 76.9% on MMMU Pro, and the model includes a configurable thinking mode that trades latency for deeper multi-step reasoning on demand. Agentic tool use is a weaker area. In Meta's own published comparison for its rival Muse Glimmer model, Gemma 4 31B scored 54.2 on MCP-Atlas and 61.7 on DeepSearch QA, both well behind Glimmer's 75.5 and 74.6. Independent reviewers describe its agentic and terminal results as modest, better suited to supervised automation than fully autonomous computer-use tasks, and Alibaba's competing Qwen3.6-27B likewise outpaces it on sustained coding-agent benchmarks. The model ships with a 262,144-token context window built on a hybrid attention design that interleaves local sliding-window layers with periodic full global attention, balancing long-context recall against inference cost. Native function calling and structured output are built in, and thinking mode can be toggled per request rather than fixed at training time. Input covers text and images; output is text only, including tool calls and structured formats. Google reports fluency across more than 140 languages, though most published evaluations focus on English-language benchmarks. There is no native audio or video support in this release. Weights are free to download and self-host under an Apache 2.0 license, so the only direct cost is compute. Third-party hosting is also available on OpenRouter at a modest per-token rate, well below typical closed frontier API pricing, alongside a separate rate-limited free routing tier for lighter usage. Together AI and LM Studio both offer day-one support alongside the official Hugging Face weights. SciCode (43.4%), TerminalBench Hard (36.4%), and IFBench (75.6%) round out DeepMind's published scores, showing a model stronger at structured reasoning and document work than at long, autonomous execution chains. Google has not published a dedicated safety or preparedness report specific to this release; the Hugging Face model card covers intended use, limitations, and standard safety fine-tuning. Gemma 4 31B fits teams that want a strong, self-hosted reasoning and document-analysis model without Gemini's per-token API costs, particularly for high-volume batch or research workloads. Teams building autonomous coding or computer-use agents will likely get better results from Muse Glimmer or Qwen3.6-27B instead. It arrives as the direct successor to the Gemma 3 line, continuing Google's yearly open-weight release cadence alongside its closed Gemini models.

Pricing

Gemma 4 31B's own weights are free under an open license; Google has not published an official per-token price. On OpenRouter, the primary independently verified third-party host, the model costs $0.08 per million input tokens and $0.35 per million output tokens, with a separate rate-limited free routing tier also available. Self-hosting instead costs only hardware and electricity.

Key Features

  • 31B Dense Reasoning Model: A 31B-parameter dense transformer built for high-accuracy reasoning, coding, and document understanding, released as the open-weight sibling to Google's closed Gemini line.
  • Long Context Window: Handles very long documents and large codebases in a single pass, using a hybrid local and global attention design that keeps inference cost manageable on extended inputs.
  • Configurable Thinking Mode: Toggle extended reasoning on a per-request basis, trading latency for deeper multi-step problem solving without switching models.
  • Native Function Calling: Built-in structured tool calling and JSON output, with no separate fine-tune or system-prompt scaffolding required.
  • 140+ Language Support: Google reports usable fluency across more than 140 languages, though published benchmark evaluations concentrate on English-language tasks.

Pros

  • Strong reasoning and document benchmarks for an open-weight model, ahead of most 30B-class rivals on GPQA Diamond and AIME 2026.
  • Free, permissively licensed weights with day-one support across Hugging Face, Together AI, and LM Studio.
  • Long context window handles large codebases or long documents in a single pass without chunking.

Cons

  • Agentic and tool-use benchmarks trail rivals: Meta's published numbers put it well behind Muse Glimmer and Qwen3.6-27B on MCP-Atlas and DeepSearch QA.
  • No native audio or video input, unlike some multimodal rivals in its weight class.
  • Weaker on sustained terminal and computer-use coding tasks than dedicated specialist coding models.

Benchmarks

  • lcr: 62
  • ifbench: 75.6
  • scicode: 43.4
  • mmlu pro: 85.2
  • mmmu pro: 76.9
  • aime 2026: 89.2
  • mcp atlas: 54.2
  • tau2 bench: 59.9
  • gpqa diamond: 85.7
  • lmarena rank: 3
  • deepsearch qa: 61.7
  • livecodebench v6: 80
  • terminalbench hard: 36.4

Frequently Asked Questions

How much does Gemma 4 31B cost to run?

Self-hosting the open weights costs nothing beyond your own hardware and electricity. Through OpenRouter, the main third-party host, pricing works out to $0.08 per million tokens in and $0.35 per million tokens out, and a separate rate-limited free tier covers lighter use.

How does Gemma 4 31B compare to Muse Glimmer and Qwen3.6-27B?

Gemma 4 31B leads on core reasoning benchmarks like GPQA Diamond and MMLU Pro, but trails both rivals on agentic tool-use tasks. Independent reviewers rate its terminal-automation results as modest next to dedicated coding-agent models, and Meta's own numbers put it behind Muse Glimmer on MCP-Atlas and DeepSearch QA.

Is Gemma 4 31B open source?

Yes. Gemma 4 31B ships under the Apache 2.0 license, a permissive license allowing commercial use, modification, and redistribution, with weights hosted on Hugging Face. This makes it fully self-hostable, unlike Google's closed Gemini API models.

What is Gemma 4 31B's context window?

Gemma 4 31B supports up to a 262K-token context window. It uses a hybrid attention setup that blends local sliding-window layers with periodic global attention, enough for most large codebases or long multi-document research tasks in a single request.

Who is Gemma 4 31B best for, and who should avoid it?

It's a strong fit for research and document-analysis teams wanting open-weight reasoning power without Gemini's per-token costs, especially for multilingual or long-context workloads. For autonomous coding or computer-use agent work, Muse Glimmer or another dedicated agentic model will likely perform better, since Gemma 4 31B trails on those benchmarks.

More AI Models on HokAI

Visit Gemma 4 31B Official Page