Gemma · 9B to 32B

Gemma 4 31B Instruct

31.27 billion parameters across 60 layers. At four-bit precision the weights alone come to 17.58 GB, before any conversation is loaded. Grouped-query attention keeps the cache small, so long contexts cost less here than on models of the same size.

General chatVision
Parameters31.27B
Layers60
KV heads16 / 32
Native context256k
Vocabulary262k

Memory needed, by quantisation

At an 8k context window. Quality is our rough ranking of how much the compression costs you: anything at or above Q5 is hard to tell apart from the original in normal use.

Quantisation File size KV cache Total VRAM Quality What it costs you
Q8_0 30.94 GB 0.94 GB 32.81 GB 99% Lossless in practice. Use it when the memory is there.
Q6_K 23.88 GB 0.94 GB 25.75 GB 98% Very close to Q8 for two thirds of the size.
Q5_K_M 20.71 GB 0.94 GB 22.58 GB 96% The quality-first choice when Q6 will not fit.
Q4_K_M 17.58 GB 0.94 GB 19.45 GB 93% The default. Best size-to-quality ratio for local use.
IQ4_XS 15.47 GB 0.94 GB 17.34 GB 91% Importance-matrix 4-bit. Q4_K_S quality, smaller file.
Q3_K_M 14.23 GB 0.94 GB 16.1 GB 86% Degradation starts to show. A way to fit one size up.
IQ3_XXS 11.14 GB 0.94 GB 13.01 GB 79% Aggressive. Only worth it on very large models.

What a longer conversation costs

Same model at Q4_K_M, only the context window changes. This model uses sliding-window attention, so most layers stop growing past 1k tokens and the bill flattens out.

ContextKV cacheTotal VRAMFits in 8 GBFits in 12 GBFits in 24 GB
4k 0.94 GB 19.29 GB no no yes
8k 0.94 GB 19.45 GB no no yes
16k 0.94 GB 19.78 GB no no yes
32k 0.94 GB 20.43 GB no no yes
64k 0.94 GB 21.75 GB no no yes
128k 0.94 GB 24.37 GB no no no

The "fits" columns allow for the roughly 0.8 GB Windows keeps for the desktop.

Which hardware runs Gemma 4 31B Instruct

56 of 118 consumer devices run it at a quantisation worth using, at an 8k context window. Another 42 can load it only by compressing the weights far enough to damage the model, marked with a warning below.

DeviceMemoryVerdictQuantisationUsedSpeed
RTX PRO 6000 Blackwell
NVIDIA
96 GB Runs great Q8_0 32.81 GB 46.1 t/s
RTX 6000 Ada Generation
NVIDIA
48 GB Runs well Q8_0 32.81 GB 24.7 t/s
Apple M3 Ultra 96GB
Apple
96 GB Runs well Q8_0 32.51 GB 20 t/s
Apple M3 Ultra 256GB
Apple
256 GB Runs well Q8_0 32.51 GB 20 t/s
Apple M3 Ultra 512GB
Apple
512 GB Runs well Q8_0 32.51 GB 20 t/s
RTX A6000
NVIDIA
48 GB Runs well Q8_0 32.81 GB 19.8 t/s
Apple M1 Ultra 64GB
Apple
64 GB Runs well Q8_0 32.51 GB 19.6 t/s
Apple M1 Ultra 128GB
Apple
128 GB Runs well Q8_0 32.51 GB 19.6 t/s
Apple M2 Ultra 64GB
Apple
64 GB Runs well Q8_0 32.51 GB 19.6 t/s
Apple M2 Ultra 128GB
Apple
128 GB Runs well Q8_0 32.51 GB 19.6 t/s
Apple M2 Ultra 192GB
Apple
192 GB Runs well Q8_0 32.51 GB 19.6 t/s
Radeon PRO W7900
AMD
48 GB Runs well Q8_0 32.81 GB 19.5 t/s
GeForce RTX 5090
NVIDIA
32 GB Runs great Q6_K 25.75 GB 59.2 t/s
GeForce RTX 4090
NVIDIA
24 GB Just fits Q5_K_M 22.58 GB 38.2 t/s
GeForce RTX 3090 Ti
NVIDIA
24 GB Just fits Q5_K_M 22.58 GB 38.2 t/s
GeForce RTX 3090
NVIDIA
24 GB Just fits Q5_K_M 22.58 GB 35.4 t/s
GeForce RTX 5090 Laptop
NVIDIA
24 GB Just fits Q5_K_M 22.58 GB 33.9 t/s
Radeon RX 7900 XTX
AMD
24 GB Just fits Q5_K_M 22.58 GB 31.9 t/s
RTX A5000
NVIDIA
24 GB Just fits Q5_K_M 22.58 GB 29.1 t/s
Apple M4 Max 36GB
Apple
36 GB Runs well Q5_K_M 22.28 GB 19.7 t/s
Apple M4 Max 48GB
Apple
48 GB Runs well Q8_0 32.51 GB 13.4 t/s
Apple M4 Max 64GB
Apple
64 GB Runs well Q8_0 32.51 GB 13.4 t/s
Apple M4 Max 128GB
Apple
128 GB Runs well Q8_0 32.51 GB 13.4 t/s
Radeon RX 7900 XT
AMD
20 GB Runs great IQ4_XS 17.34 GB 35.1 t/s
Apple M1 Max 32GB
Apple
32 GB Just fits Q5_K_M 22.28 GB 14.4 t/s
Apple M2 Max 32GB
Apple
32 GB Just fits Q5_K_M 22.28 GB 14.4 t/s
Apple M3 Max 36GB
Apple
36 GB Runs well Q5_K_M 22.28 GB 14.4 t/s
Apple M1 Max 64GB
Apple
64 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M2 Max 64GB
Apple
64 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M2 Max 96GB
Apple
96 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M3 Max 48GB
Apple
48 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M3 Max 64GB
Apple
64 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M3 Max 96GB
Apple
96 GB Runs well Q6_K 25.45 GB 12.6 t/s
Apple M3 Max 128GB
Apple
128 GB Runs well Q6_K 25.45 GB 12.6 t/s
NVIDIA DGX Spark 128GB
NVIDIA
128 GB Runs well Q5_K_M 22.58 GB 10.3 t/s
Apple M4 Pro 48GB
Apple
48 GB Runs well Q4_K_M 19.15 GB 11.5 t/s
Apple M4 Pro 64GB
Apple
64 GB Runs well Q4_K_M 19.15 GB 11.5 t/s
Apple M4 Pro 24GB
Apple
24 GB Just fits Q3_K_M 15.8 GB 14 t/s
Jetson AGX Orin 32GB
NVIDIA
32 GB Runs well IQ4_XS 17.34 GB 10.2 t/s
Jetson AGX Orin 64GB
NVIDIA
64 GB Runs well IQ4_XS 17.34 GB 10.2 t/s
Ryzen AI Max+ 395 32GB
AMD
32 GB Runs well IQ4_XS 17.34 GB 10.1 t/s
Ryzen AI Max+ 395 64GB
AMD
64 GB Runs well IQ4_XS 17.34 GB 10.1 t/s
Ryzen AI Max+ 395 96GB
AMD
96 GB Runs well IQ4_XS 17.34 GB 10.1 t/s
Ryzen AI Max+ 395 128GB
AMD
128 GB Runs well IQ4_XS 17.34 GB 10.1 t/s
GeForce RTX 5080
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 65.2 t/s
GeForce RTX 5070 Ti
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 60.8 t/s
GeForce RTX 5080 Laptop
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 52.1 t/s
GeForce RTX 4080 SUPER
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 50 t/s
GeForce RTX 4080
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 48.7 t/s
GeForce RTX 4070 Ti SUPER
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 45.6 t/s
GeForce RTX 4090 Laptop
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 39.1 t/s
Radeon RX 9070 XT
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 38.5 t/s
Radeon RX 9070
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 38.5 t/s
Radeon RX 7800 XT
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 37.2 t/s
Radeon RX 7900 GRE
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 34.3 t/s
Radeon RX 6900 XT
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 30.5 t/s
Radeon RX 6800
AMD
16 GB Runs great IQ3_XXS ! 13.01 GB 30.5 t/s
GeForce RTX 5060 Ti 16GB
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 30.4 t/s
RTX A4000
NVIDIA
16 GB Runs great IQ3_XXS ! 13.01 GB 30.4 t/s
Arc A770 16GB
Intel
16 GB Runs great IQ3_XXS ! 13.01 GB 30.1 t/s

What to buy to run Gemma 4 31B Instruct

The cheapest hardware that runs it at a quantisation worth using and a speed you would not resent, at an 8k context window.

DevicePriceMemoryRuns it atSpeed
Radeon RX 7900 XT
AMD
$650 20 GB IQ4_XS 35.1 t/s Check price
GeForce RTX 3090
NVIDIA
$700 used 24 GB Q5_K_M 35.4 t/s Check price
GeForce RTX 3090 Ti
NVIDIA
$800 used 24 GB Q5_K_M 38.2 t/s Check price
Apple M1 Max 32GB
Apple · whole machine
$1,400 32 GB Q4_K_M 16.8 t/s Check price
Apple M1 Max 64GB
Apple · whole machine
$1,900 64 GB Q4_K_M 16.8 t/s Check price
GeForce RTX 5090
NVIDIA
$2,200 32 GB Q6_K 59.2 t/s Check price
Apple M1 Ultra 128GB
Apple · whole machine
$3,400 128 GB Q8_0 19.6 t/s Check price
Apple M3 Ultra 256GB
Apple · whole machine
$5,599 256 GB Q8_0 20 t/s Check price

Indicative prices reviewed 2026-09-01; used prices are marketplace typical. Options that cost more than a cheaper one with no more memory and no more speed are hidden. Price links are Amazon affiliate links. Change the standard, the context window or the budget in the buying tool.

Where it sits in the catalogue

Source: google/gemma-4-31B-it on Hugging Face. Downloaded 8.3M times in the last month. Published 2026-03-11. Architecture figures are read from the repository's own configuration file, so they move when the model does.