Gemma 4 31B hardware requirements

31.3B parameters. Needs about 20.8 GB at Q4_K_M with 8K context.

Parameters31BDense
Q4_K_M · 8K20.8 GBthe usual download
FP16 · 8K64.4 GBfull precision
Runs well on17/51GPUs and Macs we track

Memory needed at each quantization

Weights, KV cache and runtime overhead, at 8K and 32K tokens of context.

QuantQuality8K context32K context
FP16Full quality64.4 GB65.4 GB
Q8_0Near-lossless35 GB36 GB
Q6_KExcellent27.4 GB28.4 GB
Q5_K_MVery good24 GB25 GB
Q4_K_MGood, most popular20.8 GB21.8 GB
Q3_K_MNoticeably degraded17.1 GB18.1 GB
Q2_KHeavily degraded13.5 GB14.5 GB

Run it with Ollama

Downloads Q4_K_M by default.

ollama run gemma4:31b

Model card

google/gemma-4-31B-it on Hugging Face: licence, prompt format and GGUF builds.

Run it in the cloud

Run Gemma 4 31B on a rented GPU today.

It needs about 20.8 GB at Q4_K_M: a rented RTX 3090 / RTX 4090 runs it for about $0.18 to $0.89 an hour.

Every GPU and Mac checked

Sorted by memory. Bars show how much of each card Gemma 4 31B fills at the best quant that fits.