Parameters
31.0B
Architecture
Dense Causal Transformer
Released
12.03.2026
License
Apache License 2.0
Input Modalities
Output Modalities
Context (native)
262,144 tokens
Context (extended)
262,144 tokens
About
Gemma-4-31B (google/gemma-4-31B) is the largest dense model of the Gemma 4 family of open models built by Google DeepMind - multimodal models handling text and image input (audio on the E2B/E4B/12B siblings) and generating text, with multilingual support in over 140 languages. The Gemma 4 release includes both pre-trained and instruction-tuned variants in five sizes (E2B, E4B, 12B, 26B A4B MoE, 31B), deployable from high-end phones to laptops and servers.
Its hybrid attention mechanism interleaves local Sliding-Window Attention (SWA) with full global attention (50 sliding layers with window 1024 and 10 global layers in the 31B; the final layer is always global), delivering the speed and low memory footprint of a lightweight model without sacrificing long-context awareness. To optimize long-context memory, global layers use unified Keys and Values (K=V, 4 global KV heads, head dim 512) and apply Proportional RoPE (p-RoPE) (theta 1M, partial rotary 0.25 on global layers; 10k on sliding). The 31B has 30.7B parameters, 60 layers, a 262,144-token context window, 262K vocabulary, and a ~550M vision encoder (27-layer ViT, 280 soft tokens per image, variable aspect ratio and resolution).
Gemma 4 introduces configurable thinking modes, native function calling for agentic workflows, native system role support, and enhanced coding capability. Pre-training data spans web documents, code, mathematics and images (cutoff January 2025) in over 140 languages, with CSAM and sensitive-data filtering. Smaller siblings use Per-Layer Embeddings (PLE) for parameter efficiency; the 12B "Unified" sibling is encoder-free. Released March 12, 2026 under Apache 2.0.
Training Data Pre-trained on a large-scale multimodal corpus (web documents, code, mathematics, images; 140+ languages; data cutoff January 2025) with CSAM and sensitive-data filtering. Instruction-tuned variants released separately.
Benchmark Scores
| Benchmark | Score | Date | Standing |
|---|---|---|---|
|
Terminal-Bench 2.1 (Terminus-2)
coding_agent
|
31.12%
|
19.08.2026 |
#40/44
better than 7%
|
|
SWE-bench Verified
coding_agent
|
59.17%
|
19.08.2026 |
#46/60
better than 22%
|
|
SWE-bench Multilingual
coding_agent
|
55.27%
|
19.08.2026 |
#40/48
better than 15%
|
|
NL2Repo
coding_agent
|
8.00%
|
19.08.2026 |
#38/41
better than 5%
|
|
Humanity's Last Exam
stem_reasoning
|
32.95%
|
19.08.2026 |
#50/71
better than 29%
|
|
HLE (with tools)
stem_reasoning
|
22.46%
|
19.08.2026 |
#46/49
better than 6%
|
|
GPQA Diamond
stem_reasoning
|
81.09%
|
19.08.2026 |
#50/80
better than 34%
|
|
Toolathlon Verified
general_agent
|
25.95%
|
19.08.2026 |
#32/35
better than 9%
|
|
WideSearch
general_agent
|
37.18%
|
19.08.2026 |
#21/24
better than 13%
|
|
WildClawBench
coding_agent
|
64.71%
|
19.08.2026 |
#7/20
better than 68%
|
|
MCP-Atlas
general_agent
|
55.35%
|
19.08.2026 |
#42/54
better than 23%
|
|
SWE-bench Pro
coding_agent
|
39.80%
|
19.08.2026 |
#61/77
better than 20%
|
What is a good Terminal-Bench 2.1 (Terminus-2) score? What is a good SWE-bench Verified score? What is a good SWE-bench Multilingual score?
Hardware Requirements
Estimated VRAM per quantization at 4,096 tokens context
| Quantization | Weights | KV Cache | Total VRAM | On your hardware |
|---|---|---|---|---|
| FP16 — 16-bit | 62.0 GB | 4.8 GB | 69.9 GB | Which GPUs can run it? Calculate on your GPU |
| INT8 — 8-bit | 31.0 GB | 2.4 GB | 35.0 GB | Which GPUs can run it? Calculate on your GPU |
| INT4 — 4-bit | 15.5 GB | 1.2 GB | 17.5 GB | Which GPUs can run it? Calculate on your GPU |
| FP4 — 4-bit | 15.5 GB | 1.2 GB | 17.5 GB | Which GPUs can run it? Calculate on your GPU |
Only datacenter GPUs — FP16 needs 69.9 GB. For consumer hardware, choose the INT4 build with a multi-GPU setup.
Consumer GPUs that fit this model with a single card (INT4):
Architecture
- Attention
- Hybrid Attention (32:16)
- Layers
- 60
- Hidden size
- 5376
- Context
- 262K tokens
- Parameters
- 31000M
Source: Hugging Face config.json · Gemma4ForConditionalGeneration · exact layer pattern · model repo
Training Pipeline
-
1
pretraining
Multimodal pre-training (cutoff January 2025)
Web documents, code, mathematics and images in 140+ languages; CSAM and sensitive-data filtering; evaluation decontamination.
Training & Evaluation Datasets
| Name | Role | Size | Modalities | Collection |
|---|---|---|---|---|
| Web documents (140+ languages) | pretraining | — | — | |
| Code | pretraining | — | — | |
| Mathematics | pretraining | — | — | |
| Images | pretraining | — | — |
Linked Resources
Gemma 4 Technical Report
https://arxiv.org/abs/2607.02770
Gemma 4 launch blog (Google)
https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/
Gemma documentation (Google AI for Developers)
https://ai.google.dev/gemma/docs/core
google-gemma (GitHub)
https://github.com/google-gemma
Gemma 4 (HuggingFace collection)
https://huggingface.co/collections/google/gemma-4
BibTeX citation (Google DeepMind, 2026)
https://huggingface.co/google/gemma-4-31b
Trend Analysis
24h Change
-1.9%
7d Change
-30.9%
30d Change
-85.0%
Current
44,151
followers
+0.2%
likes
+0.0%
downloads
+0.3%
downloads_all_time
+0.1%
No comments yet
Be the first to share your thoughts!