Model benchmarks
gemma4:31b local LLM performance
As of July 2026, gemma4:31b runs at up to 7.5 tok/s for local inference (best of 10 community benchmark runs across 3 GPUs).
OllamaQ4_K_M
Model size
31.3B
Peak speed
7.5 tok/s
Average speed
5.4 tok/s
Min memory
20.2 GB
Max context
65,536 tokens
Avg quality
73.8
Benchmark runs
10
GPUs tested
3
Quality by task
Average LLM-judged quality (0–100) with the run-to-run spread shown as a P5–P95 band, overall and for each benchmark task, across all 10 runs. The low and high columns show how much the judge’s score varies between runs, and need at least two runs to display.
| Task | P5 (low) | Avg | P95 (high) |
|---|---|---|---|
| Overall | 61.9 | 73.8 | 79.3 |
| Agent Workflow | 74.1 | 83.2 | 89.2 |
| Code Generation | 33.5 | 62.2 | 71.5 |
| Role Play & Narrative | 74.4 | 80.6 | 85.4 |
| Research & Analysis | 56.9 | 69.2 | 78.6 |
Performance by hardware and tool
Every hardware/tool/quantization combination gemma4:31b has been benchmarked on, ranked by peak token generation speed. Last updated July 2026.
| Hardware | Tool | Quant | Best tok/s | Avg tok/s | Memory | Context | Quality | Runs |
|---|---|---|---|---|---|---|---|---|
| Apple M5 Max | Ollama | Q4_K_M | 7.5 tok/s | 7.4 tok/s | 28.4 GB | 65,536 tokens | 77.2 | 2 |
| Apple M4 Pro | Ollama | Q4_K_M | 6.0 tok/s | 6.0 tok/s | 20.2 GB | 8,192 tokens | 76.6 | 1 |
| AMD Radeon RX 7900 XTX | Ollama | Q4_K_M | 5.5 tok/s | 4.7 tok/s | 20.6 GB | 65,536 tokens | 72.4 | 7 |
Frequently asked questions
- Is gemma4:31b good for coding?
- In our benchmarks, gemma4:31b scores 62.1/100 for coding. It runs at about 5.4 tok/s, so if you want more speed, Gemma4:E2B/QAT-MTP@131K is faster (~303.9 tok/s) and still scores well for coding (66.9/100).
- Is gemma4:31b good for agentic (tool-using) tasks?
- In our benchmarks, gemma4:31b scores 83.2/100 for agentic workflows. It runs at about 5.4 tok/s, so if you want more speed, openai/gpt-oss-20b:2 is faster (~154.8 tok/s) and still scores well for agentic workflows (87.2/100).
- How fast is gemma4:31b for local inference?
- Across 10 community benchmark runs, gemma4:31b reaches up to 7.5 tok/s and averages 5.4 tok/s, with the fastest results on Apple M5 Max.
- How much memory does gemma4:31b need?
- The leanest observed configuration used about 20.2 GB of memory (quantizations tested: Q4_K_M).
- Which tools have been used to run gemma4:31b?
- Benchmarks were submitted using Ollama. Results are community-contributed and updated as new runs arrive.