Gemma 4 31B is the largest dense model in Google's Gemma 4 family, built from the same research as Gemini 3 and released as open weights under the Apache 2.0 license. It supports a 256K token context window with text and image input, configurable thinking mode for step-by-step reasoning, and multilingual support across 140+ languages. The unquantized model fits on a single 80GB GPU.
For vision tasks, Gemma 4 31B supports image understanding with variable aspect ratios and resolutions, and can output structured bounding boxes for UI element detection, making it useful for document parsing and UI understanding. Compared to Gemma 3, it delivers stronger reasoning and multimodal performance. It is part of a four-size family alongside the 26B A4B MoE variant and two on-device models (E2B, E4B), with the 31B dense variant optimized for output quality and fine-tuning over inference speed.
Drag and drop an image here, or click to browse
Captioning will run automatically
—
Usage
Past 30 Days| Category | Passed | Score |
|---|---|---|
| Document Understanding | 8 / 9 | 88.9% |
| Defect Detection | 12 / 15 | 80% |
| Spatial Understanding | 14 / 19 | 73.7% |
| Object Understanding | 10 / 14 | 71.4% |
| Object Counting | 1 / 10 | 10% |
| Category | Passed | Score |
|---|---|---|
| License Plate Recognition | 28 / 30 | 93.3% |
| Focused Scene OCR | 86 / 99 | 86.9% |
| VQA & Extraction | 51 / 60 | 85% |
| Text Recognition | 24 / 30 | 80% |
| Handwritten Math | 5 / 10 | 50% |
Scores based on a single evaluation run · Methodology
View all Vision Evals →Gemma 4 31B costs $0.120 per 1M input tokens and $0.350 per 1M output tokens.
Pricing updated Jul 9, 2026
Estimated cost per task vs. Visual Understanding score, for this model and others ranked near it. Upper-left is the sweet spot (high quality, low cost).
11 of 11 models plotted
| Model | Score | Median tokens | Est. cost / task | Compare |
|---|---|---|---|---|
| Gemini 3.1 Flash-Lite | 68.7% | 1.1K | $0.0003 | Compare |
| Gemma 4 26B A4B | 68.7% | 531 | $0.0001 | Compare |
| Qwen3.6 Plus | 68.7% | 1.6K | $0.0005 | Compare |
| Claude Opus 4.8 | 67.2% | 2.2K | $0.012 | Compare |
| Claude Opus 4.7 | 67.2% | 2.6K | $0.015 | Compare |
| Gemma 4 31B(this model) | 67.2% | 467 | $0.0001 | — |
| Claude Opus 4.6 | 64.2% | 2.3K | $0.014 | Compare |
| GPT-5.4 Nano | 62.7% | 1.8K | $0.0004 | Compare |
| Llama 4 Maverick | 59.7% | 2.4K | $0.0004 | Compare |
| Claude Sonnet 4.5 | 59.7% | 2.3K | $0.0092 | Compare |
| Claude Opus 4.1 | 59.7% | 2.1K | $0.040 | Compare |
Other models worth comparing for similar use cases.
License terms and commercial-use guidance for Gemma 4 31B.
License information is provided as a guide and is not legal advice.