whatmodel.sh / Gemma 4 31B
Gemma 4 31B
↗ share
+ contribute
Gemma 4 31B is an open-weights language model from Google, released April 2026. Its published size is 30.7B parameters and a 262k-token context window. Licence: apache-2.0.
$ how it compares
The LLMs ranked either side of Gemma 4 31B, out of 828 with a score, then more from Google.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 131 | 67±1 | api $0.055/M | |||
| 132 | 67±1 | api $0.44/M +local | |||
| 133 | 67±1 | api $0.19/M +local | |||
| 134 | 67±1 | api $0.56/M | |||
| 135 | 67±2 | api $0.60/M +local | |||
| more from Google | |||||
| 9 | 82±1 | limited preview | |||
| 23 | 77±1 | api $1.50/M | |||
| 32 | 76±1 | api $1.50/M | |||
$ what it's good at
agent tasks▁▁▃▆█▆▅▅▅▄▃▁ #107 of 300 · 35% of its score · 17 tests
Beats Grok 4.3, o3-pro, Qwen3.6 Plus here, though they rank higher overall. Trails SmolLM3 3B, Nova 2 Pro (Preview), Mistral Medium 3.5 (128B) here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| SWE-bench Pro (split unspecified) +1 | 33.0% ✎ | ▄···▄···▄▄██ beats 2/7 | 5.0% |
| Terminal-Bench Hard lab +1 | 36.0% ✎ | ██··█·█·█··█ beats 5/5 | 4.9% |
| SWE-bench Verified +1 | 60.6% ✎ | ▄▄·····▄▄▄▄█ beats 4/7 | 4.8% |
| Terminal-Bench 2.1 | 30.3% ✎ | ▄······█▄▄█▄ beats 3/7 | 3.4% |
| ContractBench success rate (33 observation-contract tool tasks) | 37.4% ✎ | ▆··▆▄▂▄▂▆▆█▄ beats 9/23 | 2.6% |
| SWE-bench Pro public set, Qwen-refined +1 | 35.7% ✎ | ▄······▄█·▄▄ beats 0/5 | 2.3% |
| τ²-bench Telecom lab | 69.3% ✎ | ▄····█··▄·▄▄ beats 5/5 | 2.0% |
| SWE-bench Multilingual | 49.3% ✎ | ▄·▄·····█▄█▄ beats 3/7 | 1.6% |
9 more tests
| test | result | vs the others in its run | counts |
|---|---|---|---|
| K-BrowseComp-Verified (Korean web-browsing agent questions, pass@1) | 23.3% ✎ | ▃····█··▃█·▃ beats 4/8 | 1.5% |
| Tau2 – airline lab | 75.0% ✎ | ▃·▃··▃·····█ beats 4/5 | 1.4% |
| τ²-bench aggregate lab | 76.9% ✎ | ▄·▄··▄····█▄ beats 5/5 | 1.2% |
| OSWorld-Verified | 58.5% ✎ | █▄·▂▆▂▄▂▆▄▆█ beats 9/25 | 1.2% |
| MCP-Atlas (public set) | 54.2% ✎ | ▂·▁▂▁·▁▃█▆▆▂ beats 7/37 | 0.9% |
| DeepSearchQA | 61.7% ✎ | █·······█··█ beats 0/2 | 0.8% |
| Humanity's Last Exam with tools lab | 26.5% ✎ | ▂▂▂▃▄▂▃▆█▇▂▆ beats 7/54 | 0.7% |
| Tau2 – retail lab | 86.4% ✎ | ▄····▄··▄·▄█ beats 5/5 | 0.4% |
| T1-Bench multi-domain conversational agent pass^3 | 41.1% ✎ | ▂▂··▂·▂·▂▂█▄ beats 11/11 | 0.0% |
coding▁▁▁▃▆██▇▆▄▃▁ #108 of 458 · 24% of its score · 9 tests
Beats Grok 4.3, Qwen3.5 Plus, DeepSeek V3.2 here, though they rank higher overall. Trails Llama 3.1 Nemotron Ultra 253B v1, Solar Pro 4, Laguna XS 2.1 (33B-A3B) here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| SWE-bench Pro (split unspecified) +1 | 33.0% ✎ | ▄···▄···▄▄██ beats 2/7 | 5.0% |
| SWE-bench Verified +1 | 60.6% ✎ | ▄▄·····▄▄▄▄█ beats 4/7 | 4.8% |
| Arena WebDev (Code Arena) | 1364.7 ✎ | ▁▂▄▃▅█▄▇▆▄▁▁ beats 35/119 | 4.8% |
| Luau Leetcode fully solved (Torpedo Software) | 55.3% ✎ | ▁▁▁▁·▁▂▃▅▃█▇ beats 12/49 | 2.4% |
| SWE-bench Pro public set, Qwen-refined +1 | 35.7% ✎ | ▄······▄█·▄▄ beats 0/5 | 2.3% |
| SWE-bench Multilingual | 49.3% ✎ | ▄·▄·····█▄█▄ beats 3/7 | 1.6% |
| SciCode (level unspecified) | 33.2% ✎ | ▄···▄▄█▄·▄·▄ beats 5/7 | 1.3% |
| SciCode lab | 43.0% ✎ | █▄·······▄▄▄ beats 5/5 | 1.3% |
1 more test
| test | result | vs the others in its run | counts |
|---|---|---|---|
| LiveCodeBench v6 (Feb–May 2025) lab | 80.0% ✎ | ▄··▄·▄···▄·█ beats 5/5 | 0.8% |
chat & writing▁▁▁▃▅▄▅█▆▆▇▃ #52 of 393 * · 3.0% of its score · 2 tests
Beats MiMo-V2.6-Flash (309B-A15B), GPT-6 Luna, GPT-5.6 Luna here, though they rank higher overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| LMArena (text) | 1452.8 ✎ | ▁▁▁▂▃▃▃▆▆▇█▃ beats 317/379 | 2.7% |
| IFEval lab | 98.9% ✎ | ▄··▄··█···▄▄ beats 5/5 | 0.3% |
math▁▂▃▅▆▅▄█▄▁▁▁ #116 of 398 · 3.9% of its score · 3 tests
Beats Claude Sonnet 4.6, MiniMax-M3, MiMo-V2.5 (310B-A15B) here, though they rank higher overall. Trails Olmo 3.1 32B Think, Gemini 2.5 Flash, Qwen3-VL 32B Thinking here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| OTIS mock AIME 2024–2025 | 73.3% ✎ | ▃▃▄▃▃▃▇▇█▃▂▅ beats 109/193 | 2.0% |
| MATH-Vision lab | 85.6% ✎ | ██·█·····███ beats 5/5 | 1.0% |
| AIME 2026 lab | 89.2% ✎ | ▄·▄▄····▄··█ beats 5/5 | 0.9% |
vision & documents▁▁▃▂▁▃▄▂▆▇█▄ #47 of 147 · 12% of its score · 11 tests
Beats MiMo-V2.6-Pro, DeepSeek V4 Flash Vision (Exp), GPT-5 here, though they rank higher overall. Trails Qwen3.6 Flash here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| Arena vision (style controlled) | 1262.3 ✎ | ▁▁▂▂▂▂▄▅▅▆██ beats 110/145 | 1.9% |
| ChartArena chart parsing (English, mAP_high average) | 46.8% ✎ | ▁·▁·▃▃▁▇▃█·▄ beats 18/22 | 1.5% |
| MMMU Pro lab | 76.9% ✎ | ██·█····█·██ beats 5/5 | 1.5% |
| MATH-Vision lab | 85.6% ✎ | ██·█·····███ beats 5/5 | 1.0% |
| BEAR-Bench (bilingual RU/EN enterprise and academic document images, overall accuracy) | 23.5% ✎ | ▃▃·▅·▃·█·█▅▅ beats 2/14 | 1.0% |
| CharXiv (reasoning questions) | 77.7% ✎ | ▂▅▃▅▅▆▆▅▆█▆▂ beats 70/100 | 1.0% |
| OmniDocBench 1.5 overall (higher is better) | 72.5% ✎ | ▂··▃▂▂··▂▂█▅ beats 1/13 | 0.9% |
| InfographicVQA lab | 92.0% ✎ | ▄█·······█·▄ beats 5/5 | 0.9% |
3 more tests
| test | result | vs the others in its run | counts |
|---|---|---|---|
| Arena document (style controlled) | 1444.5 ✎ | ▁▁▃▃▄▃▇█▅▇▄▅ beats 9/37 | 0.9% |
| OmniDocBench 1.5 ↓ lab | 13.1% ✎ | █·█·····████ beats 5/5 | 0.6% |
| ScreenSpot-Pro | 75.9% ✎ | ▂▃▅▆██▅▂···▂ beats 21/24 | 0.5% |
web search▂▁▂▆▄█▃▃▁▁·▁ #66 of 80 · 3.1% of its score · 3 tests
Beats DeepSeek V4 Flash (Preview, Apr 2026), Nemotron 3 Ultra 550B-A55B, GLM-4.7 here, though they rank higher overall. Trails GPT-4.1 nano, GPT-4o mini (2024-07-18), Mistral Small 3.1 24B (2503) here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| K-BrowseComp-Verified (Korean web-browsing agent questions, pass@1) | 23.3% ✎ | ▃····█··▃█·▃ beats 4/8 | 1.5% |
| DeepSearchQA | 61.7% ✎ | █·······█··█ beats 0/2 | 0.8% |
| Humanity's Last Exam with tools lab | 26.5% ✎ | ▂▂▂▃▄▂▃▆█▇▂▆ beats 7/54 | 0.7% |
other tests31 not in a task · 37% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| GPQA Diamond +1 | 75.8% ✎ | ▁▁▁▁▂▄▆▄▅▇█▅ beats 116/208 | 6.6% |
| MedXPertQA MM lab | 61.3% ✎ | ▂···▂·▃··▆▂█ beats 9/13 | 2.8% |
| NL2Repo +1 | 15.5% ✎ | ▄·····█·▄▄·▄ beats 0/5 | 2.6% |
| EQ-Bench 3 (emotional intelligence, judge Elo) | 1272.9 ✎ | ▁·▂▁▄▅▅▃█▄▁▁ beats 41/62 | 1.7% |
| MRCR v2 8-needle, 128k lab | 66.4% ✎ | ▄▄·▄···█···▄ beats 5/5 | 1.6% |
| BRIDGE clinical text, zero-shot average (87 tasks) | 46.7% ✎ | ▁▁▁▁▁▂▂▃▄▆█▃ beats 96/97 | 1.5% |
| MMLU-Pro lab | 85.2% ✎ | ▄··█···▄··▄▄ beats 5/5 | 1.3% |
| MMMLU lab | 88.4% ✎ | ██··█···█·██ beats 5/5 | 1.3% |
23 more tests
$ where to run it
Through an API
api · DeepInfra · $0.19/M · $0.13 in / $0.38 out per 1M tokens · 262k context · deepinfra.com ↗ · price sourceUSD per 1M text tokens, standard uncached input and output. Product: Serverless text generation. API model: google/gemma-4-31B-it. Settings: service tier=standard, batch=no, cache=uncached input. Additional/excluded charges: Tools, cache storage, priority service and other modalities excluded.. Currency: USD.
llama.cpp · recommended
version
- Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.macOS / Linux
curl -LsSf https://llama.app/install.sh | shWindowsirm https://llama.app/install.ps1 | iex - Run Gemma 4 31B · needs ~18.7 GB · from huggingface.co/lmstudio-communitychat in the terminal
llama cli -hf lmstudio-community/gemma-4-31B-it-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf lmstudio-community/gemma-4-31B-it-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run Gemma 4 31B · needs ~18.7 GB · from huggingface.co/lmstudio-community
- Or download it in the terminal
lms get https://huggingface.co/lmstudio-community/gemma-4-31B-it-GGUF@Q4_K_M -y - Then run lms ls to see its name, and lms chat followed by that name
Ollama
version
- Install Ollama
download it (macOS / Windows) ↗
Linuxcurl -fsSL https://ollama.com/install.sh | sh - Run Gemma 4 31B · needs ~18.92 GB · from ollama.comchat in the terminal
ollama run gemma4:31b
MLX (Mac)
version
- Install MLX (Mac) · Apple silicon Macs only, text only.with uv
uv tool install mlx-lmorpip install mlx-lm - Run Gemma 4 31B · needs ~18.4 GB, Mac only · from huggingface.co/lmstudio-communitychat in the terminal
mlx_lm.chat --model lmstudio-community/gemma-4-31B-it-MLX-4bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model lmstudio-community/gemma-4-31B-it-MLX-4bit
Official weights and documentation: huggingface.co/google ↗
$ how the score was worked out · Gemma Team — Gemma 4 Technica… 27%, Kwaipilot/KAT-Coder-V2.5-Dev… 12%, meta-models/Muse-Glimmer-30B… 12% and 23 more
Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its counts column above; here it's added up by who ran the tests. How it works
$ published speed measurements · 1
Reference results for the hardware, engine and settings below. They aren't verified speeds of the downloads above or predictions for your machine.
| AMD Ryzen AI Max+ 395 (Strix Halo), Radeon 8060S iGPU; Beelink GTR9 Pro 128GB | Q4_0 (Google QAT GGUF per guide) | 11.38 tok/s | llama.cpp 86a9c79f8 (build_number 10066 as recorded), Vulkan (RADV) · llama-bench; tg128; 128 generated tokens; context depth 0; n_prompt=0 row; n_batch=2048; n_ubatch=512; flash_attn=1; type_k=f16; type_v=f16; n_gpu_layers=999; threads=16; one sequence Author's own llama-bench CSV row (avg_ts mean over repetitions, stddev_ts retained). GPU string as recorded: Radeon 8060S Graphics (RADV STRIX_HALO). Unified memory; the guide reports ~124GiB OS-visible. Kernel/Mesa/power profile per the run folder notes. Not prompt processing or multi-request throughput. Curated in the guide's data/benchmarks.csv line 8 (2026-07-18, measured-local): Official current Google QAT GGUF direct r3 scout. Text vision and native tool-call smokes passed separately. Practical workstation-state compatibility row with a known low-load CPU-only background workload; not a strict-clean speed headline or broad quality evaluation. | source ↗ |
$ quantization evidence · 35 measurements
How much of the full-precision result a quantized version kept, measured within one study. Rows from the same study share a table and aren't independent.
| precision | test | full → quantized | kept | |
|---|---|---|---|---|
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | AIME 2025 0-shot pass@1, mean of 8 seeds (without thinking) | 0.658 → 0.683 | 103.8% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | LiveCodeBench v6 0-shot pass@1 (without thinking) | 0.714 → 0.735 | 102.9% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | GPQA Diamond 0-shot pass@1 (without thinking) | 0.774 → 0.779 | 100.7% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | IFEval 0-shot prompt-level strict (without thinking) | 0.907 → 0.912 | 100.6% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | GPQA Diamond 0-shot pass@1 (with thinking) | 0.864 → 0.869 | 100.6% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | AIME 2025 0-shot pass@1, mean of 8 seeds (with thinking) | 0.871 → 0.875 | 100.5% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | MATH-500 0-shot pass@1 (with thinking) | 0.879 → 0.881 | 100.2% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | MMLU-Pro 0-shot custom-extract (without thinking) | 0.854 → 0.854 | 100.0% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | MMLU-Pro 0-shot custom-extract (with thinking) | 0.871 → 0.87 | 100.0% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | IFEval 0-shot prompt-level strict (with thinking) | 0.946 → 0.942 | 99.6% | source ↗ |
| FP8 block-wise (data-free; llm-compressor model_free_ptq FP8_BLOCK) | MATH-500 0-shot pass@1 (without thinking) | 0.894 → 0.887 | 99.2% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | LiveCodeBench v6 0-shot pass@1 (with thinking) | 0.743 → 0.792 | 106.7% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | AIME 2025 0-shot pass@1, mean of 8 seeds (with thinking) | 0.871 → 0.9 | 103.4% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | MATH-500 0-shot pass@1 (with thinking) | 0.879 → 0.895 | 101.8% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | MATH-500 0-shot pass@1 (without thinking) | 0.894 → 0.903 | 101.0% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | GPQA Diamond 0-shot pass@1 (without thinking) | 0.774 → 0.781 | 100.9% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | AIME 2025 0-shot pass@1, mean of 8 seeds (without thinking) | 0.658 → 0.662 | 100.6% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | IFEval 0-shot prompt-level strict (without thinking) | 0.907 → 0.911 | 100.4% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | IFEval 0-shot prompt-level strict (with thinking) | 0.946 → 0.949 | 100.3% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | MMLU-Pro 0-shot custom-extract (with thinking) | 0.871 → 0.871 | 100.0% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | MMLU-Pro 0-shot custom-extract (without thinking) | 0.854 → 0.853 | 99.9% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | GPQA Diamond 0-shot pass@1 (with thinking) | 0.864 → 0.86 | 99.6% | source ↗ |
| FP8 dynamic (data-free; FP8 weights per-channel, activations dynamic per-token; llm-compressor model_free_ptq FP8_DYNAMIC) | LiveCodeBench v6 0-shot pass@1 (without thinking) | 0.714 → 0.707 | 98.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | LiveCodeBench v6 0-shot pass@1 (with thinking) | 0.743 → 0.779 | 104.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | GPQA Diamond 0-shot pass@1 (with thinking) | 0.864 → 0.87 | 100.8% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | IFEval 0-shot prompt-level strict (with thinking) | 0.946 → 0.94 | 99.3% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | MMLU-Pro 0-shot custom-extract (with thinking) | 0.871 → 0.864 | 99.2% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | AIME 2025 0-shot pass@1, mean of 8 seeds (with thinking) | 0.871 → 0.863 | 99.0% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | IFEval 0-shot prompt-level strict (without thinking) | 0.907 → 0.898 | 99.0% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | MATH-500 0-shot pass@1 (with thinking) | 0.879 → 0.87 | 98.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | LiveCodeBench v6 0-shot pass@1 (without thinking) | 0.714 → 0.707 | 98.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | MMLU-Pro 0-shot custom-extract (without thinking) | 0.854 → 0.845 | 98.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | GPQA Diamond 0-shot pass@1 (without thinking) | 0.774 → 0.766 | 98.9% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | AIME 2025 0-shot pass@1, mean of 8 seeds (without thinking) | 0.658 → 0.65 | 98.7% | source ↗ |
| NVFP4 (FP4 weights/activations with per-group scaling; llm-compressor NVFP4) | MATH-500 0-shot pass@1 (without thinking) | 0.894 → 0.851 | 95.2% | source ↗ |
$ improve this page
Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.
data updated · sources and licences · json