Gemma 4 31B
31.3B parameters · 256k context · apache-2.0 · released 2026-03-11
chatcodingagenticreasoningvision
In short
Gemma 4 31B is an open model from Google with 31.3B parameters. At Q4_K_M, Gemma 4 31B needs about 19 GB of memory at 8k context and 29 GB at 128k, counting the weights, the KV cache and runtime buffers. The cheapest hardware in the US that runs Gemma 4 31B fully in memory at 128k context is the NVIDIA RTX PRO 4500 Blackwell, $4,000 at eBay, at about 19 tok/s (estimated).
Updated . Speeds are estimates; how they are worked out.
Cheapest way to run it in the US today
NVIDIA RTX PRO 4500 Blackwell, new at eBay
Runs Gemma 4 31B at Q4_K_M fully in memory at 128k context, about 19 tok/sest.
$4,000
In stock, checked
What to run it on in the US
Fully in memory at 128k context, priced at retailers today.
Cheapest
NVIDIA RTX PRO 4500 Blackwell19tok/sest.Q4_K_M
$4,000
Best value
NVIDIA GeForce RTX 509037tok/sest.Q4_K_M
$6,495
Fastest
NVIDIA GeForce RTX 509037tok/sest.Q4_K_M
$6,495
All hardware that runs it
Everything we price, best value first. Two cards split the model by layers.
| Hardware | Quant | Fits | Decode | Price | tok/s per 1,000 |
|---|---|---|---|---|---|
| AMD Radeon AI PRO R9700 | Q4_K_M | fits | 12 tok/s | $1,700 | 6.9 |
| Intel Arc Pro B70 | Q4_K_M | fits | 10 tok/s | $1,800 | 5.7 |
| Mac mini M4 Pro 48GB | Q6_K | fits | 5 tok/s | $2,025 | 2.4 |
| Mac mini M4 Pro 64GB | Q8_0 | fits | 4 tok/s | $2,399 | 1.7 |
| GMKtec EVO-X2 Ryzen AI Max+ 395 128GB | Q8_0 | fits | 3 tok/s | $3,500 | 0.9 |
| Mac Studio M4 Max 64GB | Q8_0 | fits | 8 tok/s | $3,500 | 2.3 |
| Beelink GTR9 Pro Ryzen AI Max+ 395 128GB | Q8_0 | fits | 3 tok/s | $3,800 | 0.8 |
| Minisforum MS-S1 Max Ryzen AI Max+ 395 128GB | Q8_0 | fits | 3 tok/s | $3,959 | 0.8 |
| NVIDIA RTX PRO 4500 Blackwell | Q4_K_M | fits | 19 tok/s | $4,000 | 4.7 |
| AMD Radeon PRO W7900 | Q8_0 | fits | 11 tok/s | $4,000 | 2.7 |
| Mac Studio M3 Ultra 96GB | Q8_0 | fits | 12 tok/s | $4,758 | 2.5 |
| Mac Studio M4 Max 128GB | Q8_0 | fits | 8 tok/s | $5,400 | 1.5 |
| NVIDIA RTX A6000 | Q8_0 | fits | 11 tok/s | $5,989 | 1.8 |
| ASUS Ascent GX10 128GB | Q8_0 | fits | 4 tok/s | $6,100 | 0.6 |
| NVIDIA GeForce RTX 5090 | Q4_K_M | fits | 37 tok/s | $6,495 | 5.7 |
| NVIDIA RTX PRO 5000 Blackwell 48GB | Q8_0 | fits | 19 tok/s | $6,999 | 2.7 |
| NVIDIA DGX Spark 128GB | Q8_0 | fits | 4 tok/s | $7,800 | 0.5 |
| NVIDIA RTX 6000 Ada Generation | Q8_0 | fits | 14 tok/s | $8,495 | 1.6 |
| NVIDIA RTX PRO 5000 Blackwell 72GB | Q8_0 | fits | 19 tok/s | $8,499 | 2.2 |
| Mac Studio M3 Ultra 256GB | Q8_0 | fits | 12 tok/s | $9,500 | 1.3 |
| NVIDIA RTX PRO 6000 Blackwell | Q8_0 | fits | 25 tok/s | $16,000 | 1.6 |
| Mac Studio M3 Ultra 512GB | Q8_0 | fits | 12 tok/s | $30,000 | 0.4 |
| Framework Desktop Ryzen AI Max+ 395 128GB | Q8_0 | fits | 3 tok/s | – | – |
| Framework Desktop Ryzen AI Max+ 395 64GB | Q8_0 | fits | 3 tok/s | – | – |
| Lenovo ThinkStation PGX GB10 128GB | Q8_0 | fits | 4 tok/s | – | – |
| Dell Pro Max with GB10 128GB | Q8_0 | fits | 4 tok/s | – | – |
| Intel Arc B570 | Q4_K_M | offload | 2 tok/s | $304 | 7.2 |
| NVIDIA RTX PRO 4000 Blackwell | Q4_K_M | offload | 6 tok/s | $339 | 16.8 |
| NVIDIA GeForce RTX 5050 | Q4_K_M | offload | 2 tok/s | $359 | 5.8 |
| NVIDIA GeForce RTX 3060 12GB | Q4_K_M | offload | 3 tok/s | $388 | 6.4 |
| NVIDIA GeForce RTX 4060 | Q4_K_M | offload | 2 tok/s | $400 | 5.3 |
| Intel Arc B580 | Q4_K_M | offload | 2 tok/s | $425 | 5.6 |
| NVIDIA GeForce RTX 5060 | Q4_K_M | offload | 2 tok/s | $435 | 5.1 |
| NVIDIA Tesla P40 | Q4_K_M | offload | 4 tok/s | $449 | 9.8 |
| NVIDIA GeForce RTX 3080 10GB | Q4_K_M | offload | 2 tok/s | $500 | 4.8 |
| NVIDIA GeForce RTX 5060 Ti 8GB | Q4_K_M | offload | 2 tok/s | $511 | 4.3 |
| NVIDIA GeForce RTX 4060 Ti 8GB | Q4_K_M | offload | 2 tok/s | $536 | 3.9 |
| NVIDIA GeForce RTX 4070 | Q4_K_M | offload | 3 tok/s | $570 | 4.6 |
| Intel Arc Pro B50 | Q4_K_M | offload | 2 tok/s | $600 | 4.0 |
| NVIDIA GeForce RTX 5060 Ti 16GB | Q4_K_M | offload | 3 tok/s | $618 | 4.9 |
| AMD Radeon RX 9060 XT 16GB | Q4_K_M | offload | 3 tok/s | $720 | 3.8 |
| Intel Arc A770 16GB | Q4_K_M | offload | 3 tok/s | $745 | 4.0 |
| AMD Radeon RX 7800 XT | Q4_K_M | offload | 3 tok/s | $757 | 4.1 |
| NVIDIA RTX PRO 2000 Blackwell | Q4_K_M | offload | 3 tok/s | $795 | 3.5 |
| NVIDIA GeForce RTX 4070 Super | Q4_K_M | offload | 3 tok/s | $800 | 3.3 |
| AMD Radeon RX 9070 XT | Q4_K_M | offload | 3 tok/s | $810 | 3.8 |
| AMD Radeon RX 9070 | Q4_K_M | offload | 3 tok/s | $860 | 3.6 |
| AMD Radeon RX 7900 XT | Q4_K_M | offload | 4 tok/s | $880 | 4.7 |
| Intel Arc Pro B60 | Q4_K_M | offload | 4 tok/s | $899 | 4.9 |
| NVIDIA GeForce RTX 5070 | Q4_K_M | offload | 3 tok/s | $900 | 2.9 |
| NVIDIA GeForce RTX 4060 Ti 16GB | Q4_K_M | offload | 3 tok/s | $918 | 3.0 |
| AMD Radeon RX 7600 XT | Q4_K_M | offload | 3 tok/s | $959 | 2.8 |
| NVIDIA GeForce RTX 4070 Ti Super | Q4_K_M | offload | 3 tok/s | $1,140 | 2.8 |
| NVIDIA GeForce RTX 5070 Ti | Q4_K_M | offload | 3 tok/s | $1,300 | 2.5 |
| AMD Radeon RX 7900 XTX | Q4_K_M | offload | 6 tok/s | $1,400 | 4.3 |
| NVIDIA GeForce RTX 4080 Super | Q4_K_M | offload | 3 tok/s | $1,469 | 2.2 |
| NVIDIA GeForce RTX 5080 | Q4_K_M | offload | 3 tok/s | $1,900 | 1.7 |
| NVIDIA GeForce RTX 3090 | Q4_K_M | offload | 6 tok/s | $1,979 | 3.2 |
| NVIDIA GeForce RTX 3090 Ti | Q4_K_M | offload | 6 tok/s | $2,033 | 3.1 |
| NVIDIA GeForce RTX 4090 | Q4_K_M | offload | 6 tok/s | $2,073 | 3.1 |
| NVIDIA RTX PRO 4000 Blackwell SFF Edition | Q4_K_M | offload | 5 tok/s | $2,980 | 1.6 |
2 other cards and machines we price cannot hold it at this context.
Memory needed
Weights, KV cache and runtime buffers at each context length (KV cache at fp16).
| Quant | File | @8k | @32k | @64k | @128k |
|---|---|---|---|---|---|
| Q4_K_Mgguf | 17.1 GB | 19.2 GB | 21.2 GB | 23.9 GB | 29.3 GB |
| mlx-4bitmlx | 17.1 GB | 19.3 GB | 21.3 GB | 24.0 GB | 29.4 GB |
| Q5_K_Mgguf | 20.2 GB | 22.3 GB | 24.3 GB | 27.0 GB | 32.4 GB |
| Q6_Kgguf | 23.5 GB | 25.6 GB | 27.6 GB | 30.3 GB | 35.7 GB |
| Q8_0gguf | 30.4 GB | 32.5 GB | 34.6 GB | 37.3 GB | 42.6 GB |
| mlx-8bitmlx | 31.4 GB | 33.6 GB | 35.6 GB | 38.3 GB | 43.7 GB |
Run it
Copy a command for the runtime you use.
- Q4_K_M
- Ollama
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q4_K_M - LM Studio
lms get unsloth/gemma-4-31B-it-GGUF@q4_k_m - llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q4_K_M
- Ollama
- mlx-4bit
- LM Studio
lms get mlx-community/gemma-4-31B-it-4bit - MLX
mlx_lm.server --model mlx-community/gemma-4-31B-it-4bit
- LM Studio
- Q5_K_M
- Ollama
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q5_K_M - LM Studio
lms get unsloth/gemma-4-31B-it-GGUF@q5_k_m - llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q5_K_M
- Ollama
- Q6_K
- Ollama
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q6_K - LM Studio
lms get unsloth/gemma-4-31B-it-GGUF@q6_k - llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q6_K
- Ollama
- Q8_0
- Ollama
ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q8_0 - LM Studio
lms get unsloth/gemma-4-31B-it-GGUF@q8_0 - llama.cpp
llama-server -hf unsloth/gemma-4-31B-it-GGUF:Q8_0
- Ollama
- mlx-8bit
- LM Studio
lms get mlx-community/gemma-4-31B-it-8bit - MLX
mlx_lm.server --model mlx-community/gemma-4-31B-it-8bit
- LM Studio
Questions
- How much VRAM does Gemma 4 31B need?
- At Q4_K_M, Gemma 4 31B needs about 19 GB of memory at 8k context and 29 GB at 128k, counting the weights, the KV cache and runtime buffers.
- What is the best GPU for running Gemma 4 31B locally?
- The cheapest hardware in the US that runs Gemma 4 31B fully in memory at 128k context is the NVIDIA RTX PRO 4500 Blackwell, $4,000 at eBay, at about 19 tok/s (estimated). The best value is the NVIDIA GeForce RTX 5090 (about 37 tok/s for $6,495). The fastest we price is the NVIDIA GeForce RTX 5090, at about 37 tok/s.
- What is the cheapest way to run Gemma 4 31B in the US today?
- The NVIDIA RTX PRO 4500 Blackwell, $4,000 new at eBay, in stock: it runs Gemma 4 31B at Q4_K_M fully in memory at 128k context, at about 19 tok/s (estimated).
- Can I run Gemma 4 31B on a 16 GB GPU?
- Only partly: at 128k context it does not fit in 16 GB, so part of it runs from system RAM and it slows to about 2 tok/s on the Intel Arc Pro B50 (estimated).
- Can I run Gemma 4 31B on a 24 GB GPU?
- Only partly: at 128k context it does not fit in 24 GB, so part of it runs from system RAM and it slows to about 6 tok/s on the NVIDIA RTX PRO 4000 Blackwell (estimated).
- How do I run Gemma 4 31B locally?
- With Ollama: ollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q4_K_M (the Q4_K_M build). LM Studio and llama.cpp commands are on this page.
- What licence is Gemma 4 31B released under?
- apache-2.0, which allows commercial use.