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.
Score within the LMArena (text) comparison set only.
$ how it compares
The LLMs ranked either side of Gemma 4 31B, out of 897 with a score, then more from Google.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 149 | 66±1 | local | |||
| 150 | 66±2 | comparison only | |||
| 151 | 66±1 | api $0.19/M +local | |||
| 152 | 66±1 | api $1.07/M +local | |||
| 153 | 66±1 | api $0.055/M | |||
| more from Google | |||||
| 3 | 84±1 | api $4.00/M | |||
| 9 | 81±1 | api $4.00/M | |||
| 14 | 79±2 | api $3.00/M | |||
$ what it's good at
agent tasks▁▁▃▆█▄▅▅▃▃▂▁ #125 of 319 · 34% of its score · 17 tests
Beats o3-pro, Grok 4.3, Qwen3.6 Plus here, though they rank higher overall. Trails SmolLM3 3B, Jamba 1.5 Large, Devstral 2 (2512) 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.4% |
| SWE-bench Verified +1 | 60.6% ✎ | ▄▄·····▄▄▄▄█ beats 4/7 | 4.9% |
| Terminal-Bench Hard lab +1 | 36.0% ✎ | ██··█·█·█··█ beats 5/5 | 4.7% |
| Terminal-Bench 2.1 | 30.3% ✎ | ▄······█▄▄█▄ beats 3/7 | 3.2% |
| ContractBench success rate (33 observation-contract tool tasks) | 37.4% ✎ | ▆··▆▄▂▄▂▆▆█▄ beats 9/23 | 2.3% |
| SWE-bench Pro public set, Qwen-refined +1 | 35.7% ✎ | ▄······▄█·▄▄ beats 0/5 | 2.0% |
| τ²-bench Telecom lab | 69.3% ✎ | ▄····█··▄·▄▄ beats 5/5 | 2.0% |
| SWE-bench Multilingual | 49.3% ✎ | ▄·▄·····█▄█▄ beats 3/7 | 1.8% |
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.3% |
| Tau2 – airline lab | 75.0% ✎ | ▃·▃··▃·····█ beats 4/5 | 1.3% |
| OSWorld-Verified | 58.5% ✎ | █▃·▂▅▂▅▂▅▃▆▆ beats 10/28 | 1.2% |
| τ²-bench aggregate lab | 76.9% ✎ | ▄·▄··▄····█▄ beats 5/5 | 0.9% |
| MCP-Atlas (public set) | 54.2% ✎ | ▂·▁▂▂·▁▃█▆▆▃ beats 8/41 | 0.9% |
| DeepSearchQA | 61.7% ✎ | ▃·▃▃···▃▃··█ beats 0/7 | 0.8% |
| Humanity's Last Exam with tools lab | 26.5% ✎ | ▁·▁▂▁▃▃▂█▅▄▁ beats 11/64 | 0.8% |
| 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▁▁▁▃▆▇█▆▆▃▃▁ #119 of 474 · 25% of its score · 9 tests
Beats Grok 4.3, Muse Glimmer 30B, Qwen3.5 122B-A10B here, though they rank higher overall. Trails Llama 3.1 Nemotron Ultra 253B v1, Solar Pro 4, Nemotron Cascade 2 30B-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.4% |
| Arena WebDev (Code Arena) | 1369.9 ✎ | ▁▂▄▃▇█▅▇▇▅▂▁ beats 36/134 | 5.0% |
| SWE-bench Verified +1 | 60.6% ✎ | ▄▄·····▄▄▄▄█ beats 4/7 | 4.9% |
| Luau Leetcode fully solved (Torpedo Software) | 55.3% ✎ | ▁▁▁▁·▁▂▃▅▃█▇ beats 12/49 | 2.6% |
| SWE-bench Pro public set, Qwen-refined +1 | 35.7% ✎ | ▄······▄█·▄▄ beats 0/5 | 2.0% |
| SWE-bench Multilingual | 49.3% ✎ | ▄·▄·····█▄█▄ beats 3/7 | 1.8% |
| SciCode (level unspecified) | 33.2% ✎ | ▄···▄▄█▄·▄·▄ beats 5/7 | 1.4% |
| SciCode lab | 43.0% ✎ | █▄·······▄▄▄ beats 5/5 | 1.2% |
1 more test
| test | result | vs the others in its run | counts |
|---|---|---|---|
| LiveCodeBench v6 (Feb–May 2025) lab | 80.0% ✎ | ▄··▄·▄···▄·█ beats 5/5 | 0.7% |
chat & writing▁▁▁▃▅▄▆█▇▇▇▃ #57 of 405 * · 3.0% of its score · 2 tests
Beats Claude Haiku 5.5, Inkling 2 Small (594B-A17B), MiMo-V2.6-Flash (309B-A15B) here, though they rank higher overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| LMArena (text) | 1451.8 ✎ | ▁▁▁▂▃▂▃▆▆▇█▃ beats 323/388 | 2.7% |
| IFEval lab | 98.9% ✎ | ▄··▄··█···▄▄ beats 5/5 | 0.2% |
math▁▁▃▅█▆▅█▄▁▁▁ #130 of 440 · 3.4% 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, Granite 4.2 8B, gpt-oss-120b here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| OTIS mock AIME 2024–2025 | 73.3% ✎ | ▃▃▄▃▃▃▇▆█▄▃▆ beats 109/207 | 1.7% |
| MATH-Vision lab | 85.6% ✎ | ██·█·····███ beats 5/5 | 0.9% |
| AIME 2026 lab | 89.2% ✎ | ▄·▄▄····▄··█ beats 5/5 | 0.8% |
vision & documents▁▁▂▂▁▃▄▂▆▇█▄ #48 of 154 · 12% of its score · 11 tests
Beats MiMo-V2.6-Pro, MiMo-V2.6-Flash (309B-A15B), GPT-6 Luna 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) | 1264.8 ✎ | ▁▁▂▂▂▂▃▅▅▅█▇ beats 121/152 | 1.9% |
| ChartArena chart parsing (English, mAP_high average) | 46.8% ✎ | ▁·▁·▃▃▁▇▃█·▄ beats 18/22 | 1.6% |
| MMMU Pro lab | 76.9% ✎ | ██·█····█·██ beats 5/5 | 1.5% |
| Arena document (style controlled) | 1452.0 ✎ | ▁▃▁▃▄█▇▅█▄▄▅ beats 14/39 | 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 71/105 | 1.0% |
| MATH-Vision lab | 85.6% ✎ | ██·█·····███ beats 5/5 | 0.9% |
| InfographicVQA lab | 92.0% ✎ | ▄█·······█·▄ beats 5/5 | 0.9% |
3 more tests
| test | result | vs the others in its run | counts |
|---|---|---|---|
| OmniDocBench 1.5 overall (higher is better) | 72.5% ✎ | ▂··▃▂▂··▂▂█▅ beats 1/13 | 0.8% |
| OmniDocBench 1.5 ↓ lab | 13.1% ✎ | █·█·····████ beats 5/5 | 0.6% |
| ScreenSpot-Pro | 75.9% ✎ | ▂▃▅▆██▅▂▂··▂ beats 21/25 | 0.5% |
web search▂▁▂▆▅█▄▃▁▁▁▁ #73 of 85 · 2.8% 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.3% |
| DeepSearchQA | 61.7% ✎ | ▃·▃▃···▃▃··█ beats 0/7 | 0.8% |
| Humanity's Last Exam with tools lab | 26.5% ✎ | ▁·▁▂▁▃▃▂█▅▄▁ beats 11/64 | 0.8% |
other tests32 not in a task · 38% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| GPQA Diamond +1 | 75.8% ✎ | ▁▁▁▁▂▃▅▄▄▆█▃ beats 116/221 | 6.4% |
| MedXPertQA MM lab | 61.3% ✎ | ▂···▂·▃··▆▂█ beats 9/13 | 2.4% |
| NL2Repo +1 | 15.5% ✎ | ▄·····█·▄▄·▄ beats 0/5 | 2.3% |
| Chess Puzzles (Epoch) | 5.0% ✎ | █▁▁▁▁▂▄▂▃▃▂▁ beats 21/157 | 2.0% |
| BRIDGE clinical text, zero-shot average (87 tasks) | 46.7% ✎ | ▁▁▁▁▁▂▂▃▄▆█▃ beats 96/97 | 1.9% |
| EQ-Bench 3 (emotional intelligence, judge Elo) | 1272.9 ✎ | ▁·▂▁▄▅▅▃█▄▁▁ beats 41/62 | 1.8% |
| AraGen-v3 3C3H score (Inception, Claude Sonnet 4 judge) | 72.7% ✎ | ▁▁·▁▂▂▄█▄▅▄▄ beats 57/66 | 1.5% |
| MRCR v2 8-needle, 128k lab | 66.4% ✎ | ▄▄·▄···█···▄ beats 5/5 | 1.4% |
24 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.
Memory is what a version takes in GPU memory (or a Mac's unified memory) with an 8k-token conversation. With less, it runs partly from system RAM, more slowly. Enter your machine to see what runs at full speed.
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 25.2 GB memory, 19.9 GB download · 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 25.2 GB memory, 19.9 GB download · 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 25.7 GB memory, 20.4 GB download · 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 23.7 GB memory, 18.4 GB download, 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
Model repository and documentation: huggingface.co/google ↗
$ how the score was worked out · Gemma Team — Gemma 4 Technica… 25%, Kwaipilot/KAT-Coder-V2.5-Dev… 12%, meta-models/Muse-Glimmer-30B… 12% and 24 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 sequencenoteAuthor'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