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 Canada that runs Gemma 4 31B fully in memory at 128k context is the NVIDIA RTX PRO 4500 Blackwell, $6,599 at Amazon, at about 19 tok/s (estimated).

Updated . Speeds are estimates; how they are worked out.

Cheapest way to run it in Canada today

NVIDIA RTX PRO 4500 Blackwell, new at Amazon

Runs Gemma 4 31B at Q4_K_M fully in memory at 128k context, about 19 tok/sest.

$6,599

In stock, checked

What to run it on in Canada

Fully in memory at 128k context, priced at retailers today.

All hardware that runs it

Everything we price, best value first. Two cards split the model by layers.

HardwareQuantFitsDecodePricetok/s per 1,000
AMD Radeon AI PRO R9700Q4_K_Mfits12 tok/s$2,8694.1
Intel Arc Pro B70Q4_K_Mfits10 tok/s$4,0882.5
AMD Radeon PRO W7900Q8_0fits11 tok/s$4,9002.2
GMKtec EVO-X2 Ryzen AI Max+ 395 128GBQ8_0fits3 tok/s$5,2890.6
NVIDIA RTX PRO 4500 BlackwellQ4_K_Mfits19 tok/s$6,5992.8
ASUS Ascent GX10 128GBQ8_0fits4 tok/s$8,5000.4
NVIDIA DGX Spark 128GBQ8_0fits4 tok/s$11,1500.3
NVIDIA RTX A6000Q8_0fits11 tok/s$11,4780.9
NVIDIA GeForce RTX 5090Q4_K_Mfits37 tok/s$12,3003.0
NVIDIA RTX PRO 5000 Blackwell 48GBQ8_0fits19 tok/s$13,4371.4
NVIDIA RTX 6000 Ada GenerationQ8_0fits14 tok/s$15,1360.9
NVIDIA RTX PRO 5000 Blackwell 72GBQ8_0fits19 tok/s$20,6500.9
Mac Studio M3 Ultra 512GBQ8_0fits12 tok/s$28,0000.4
Mac Studio M4 Max 128GBQ8_0fits8 tok/s––
Mac mini M4 Pro 64GBQ8_0fits4 tok/s––
Framework Desktop Ryzen AI Max+ 395 128GBQ8_0fits3 tok/s––
Mac Studio M3 Ultra 256GBQ8_0fits12 tok/s––
Mac mini M4 Pro 48GBQ6_Kfits5 tok/s––
Mac Studio M4 Max 64GBQ8_0fits8 tok/s––
Mac Studio M3 Ultra 96GBQ8_0fits12 tok/s––
NVIDIA RTX PRO 6000 BlackwellQ8_0fits25 tok/s––
Framework Desktop Ryzen AI Max+ 395 64GBQ8_0fits3 tok/s––
Minisforum MS-S1 Max Ryzen AI Max+ 395 128GBQ8_0fits3 tok/s––
Lenovo ThinkStation PGX GB10 128GBQ8_0fits4 tok/s––
Dell Pro Max with GB10 128GBQ8_0fits4 tok/s––
Beelink GTR9 Pro Ryzen AI Max+ 395 128GBQ8_0fits3 tok/s––
NVIDIA GeForce RTX 3060 12GBQ4_K_Moffload3 tok/s$5634.4
NVIDIA GeForce RTX 5050Q4_K_Moffload2 tok/s$5703.7
NVIDIA GeForce RTX 5060 Ti 8GBQ4_K_Moffload2 tok/s$5903.7
NVIDIA GeForce RTX 5060Q4_K_Moffload2 tok/s$6083.6
NVIDIA GeForce RTX 4060Q4_K_Moffload2 tok/s$6753.1
Intel Arc B570Q4_K_Moffload2 tok/s$8012.7
NVIDIA GeForce RTX 3080 10GBQ4_K_Moffload2 tok/s$8602.8
NVIDIA GeForce RTX 4060 Ti 8GBQ4_K_Moffload2 tok/s$8642.4
AMD Radeon RX 9060 XT 16GBQ4_K_Moffload3 tok/s$8703.1
NVIDIA GeForce RTX 5060 Ti 16GBQ4_K_Moffload3 tok/s$1,1302.7
NVIDIA RTX PRO 2000 BlackwellQ4_K_Moffload3 tok/s$1,1492.4
AMD Radeon RX 9070Q4_K_Moffload3 tok/s$1,2002.6
NVIDIA GeForce RTX 5070Q4_K_Moffload3 tok/s$1,2062.2
AMD Radeon RX 9070 XTQ4_K_Moffload3 tok/s$1,2852.4
NVIDIA GeForce RTX 4070Q4_K_Moffload3 tok/s$1,3002.0
AMD Radeon RX 7800 XTQ4_K_Moffload3 tok/s$1,4222.2
AMD Radeon RX 7900 XTQ4_K_Moffload4 tok/s$1,4372.9
AMD Radeon RX 7600 XTQ4_K_Moffload3 tok/s$1,4451.9
NVIDIA GeForce RTX 5070 TiQ4_K_Moffload3 tok/s$1,8901.7
AMD Radeon RX 7900 XTXQ4_K_Moffload6 tok/s$2,0412.9
Intel Arc Pro B60Q4_K_Moffload4 tok/s$2,0792.1
NVIDIA GeForce RTX 4070 SuperQ4_K_Moffload3 tok/s$2,0961.2
NVIDIA GeForce RTX 3090 TiQ4_K_Moffload6 tok/s$2,5002.6
NVIDIA GeForce RTX 4080 SuperQ4_K_Moffload3 tok/s$2,5001.3
NVIDIA RTX PRO 4000 BlackwellQ4_K_Moffload6 tok/s$2,8102.0
NVIDIA GeForce RTX 5080Q4_K_Moffload3 tok/s$2,9991.1
NVIDIA GeForce RTX 3090Q4_K_Moffload6 tok/s$3,3001.9
NVIDIA GeForce RTX 4090Q4_K_Moffload6 tok/s$9,1600.7
NVIDIA GeForce RTX 4060 Ti 16GBQ4_K_Moffload3 tok/s––
NVIDIA GeForce RTX 4070 Ti SuperQ4_K_Moffload3 tok/s––
Intel Arc B580Q4_K_Moffload2 tok/s––
NVIDIA Tesla P40Q4_K_Moffload4 tok/s––
Intel Arc A770 16GBQ4_K_Moffload3 tok/s––
NVIDIA RTX PRO 4000 Blackwell SFF EditionQ4_K_Moffload5 tok/s––
Intel Arc Pro B50Q4_K_Moffload2 tok/s––

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).

QuantFile@8k@32k@64k@128k
Q4_K_Mgguf17.1 GB19.2 GB21.2 GB23.9 GB29.3 GB
mlx-4bitmlx17.1 GB19.3 GB21.3 GB24.0 GB29.4 GB
Q5_K_Mgguf20.2 GB22.3 GB24.3 GB27.0 GB32.4 GB
Q6_Kgguf23.5 GB25.6 GB27.6 GB30.3 GB35.7 GB
Q8_0gguf30.4 GB32.5 GB34.6 GB37.3 GB42.6 GB
mlx-8bitmlx31.4 GB33.6 GB35.6 GB38.3 GB43.7 GB

Run it

Copy a command for the runtime you use.

  • Q4_K_M
    • Ollamaollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q4_K_M
    • LM Studiolms get unsloth/gemma-4-31B-it-GGUF@q4_k_m
    • llama.cppllama-server -hf unsloth/gemma-4-31B-it-GGUF:Q4_K_M
  • mlx-4bit
    • LM Studiolms get mlx-community/gemma-4-31B-it-4bit
    • MLXmlx_lm.server --model mlx-community/gemma-4-31B-it-4bit
  • Q5_K_M
    • Ollamaollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q5_K_M
    • LM Studiolms get unsloth/gemma-4-31B-it-GGUF@q5_k_m
    • llama.cppllama-server -hf unsloth/gemma-4-31B-it-GGUF:Q5_K_M
  • Q6_K
    • Ollamaollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q6_K
    • LM Studiolms get unsloth/gemma-4-31B-it-GGUF@q6_k
    • llama.cppllama-server -hf unsloth/gemma-4-31B-it-GGUF:Q6_K
  • Q8_0
    • Ollamaollama run hf.co/unsloth/gemma-4-31B-it-GGUF:Q8_0
    • LM Studiolms get unsloth/gemma-4-31B-it-GGUF@q8_0
    • llama.cppllama-server -hf unsloth/gemma-4-31B-it-GGUF:Q8_0
  • mlx-8bit
    • LM Studiolms get mlx-community/gemma-4-31B-it-8bit
    • MLXmlx_lm.server --model mlx-community/gemma-4-31B-it-8bit

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 Canada that runs Gemma 4 31B fully in memory at 128k context is the NVIDIA RTX PRO 4500 Blackwell, $6,599 at Amazon, at about 19 tok/s (estimated). The best value is the NVIDIA GeForce RTX 5090 (about 37 tok/s for $12,300). 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 Canada today?
The NVIDIA RTX PRO 4500 Blackwell, $6,599 new at Amazon, 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 3 tok/s on the AMD Radeon RX 9060 XT 16GB (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 AMD Radeon RX 7900 XTX (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.

More hardware for local AI