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. This one is cache-hungry: a 32k window adds 10.8 GB on top, so context length matters more here than the model size suggests.

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

About Gemma 4 31B Instruct

Gemma 4 31B Instruct is a dense model with 31.27B parameters, built from 60 layers with a hidden size of 5376. Its repository was published on 2026-03-11. The license listed on Hugging Face is apache-2.0. 50 of its 60 layers use a sliding window of 1k tokens, so only 10 keep growing with the conversation.

Memory needed, by quantization

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.

Quantization File size KV cache Total VRAM Quality What it costs you
Q8_0 30.94 GB 3.28 GB 34.67 GB 99% Lossless in practice. Use it when the memory is there.
Q6_K 23.88 GB 3.28 GB 27.61 GB 98% Very close to Q8 for two thirds of the size.
Q5_K_M 20.71 GB 3.28 GB 24.44 GB 96% The quality-first choice when Q6 will not fit.
Q4_K_M 17.58 GB 3.28 GB 21.31 GB 93% The default. Best size-to-quality ratio for local use.
IQ4_XS 15.47 GB 3.28 GB 19.2 GB 91% Importance-matrix 4-bit. Q4_K_S quality, smaller file.
Q3_K_M 14.23 GB 3.28 GB 17.96 GB 86% Degradation starts to show. A way to fit one size up.
IQ3_XXS 11.14 GB 3.28 GB 14.87 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. 50 of its 60 layers use sliding-window attention, so their cache stops growing past 1k tokens and only the other 10 keep growing.

ContextKV cacheTotal VRAMFits in 8 GBFits in 12 GBFits in 24 GB
4k 2.03 GB 20.06 GB no no yes
8k 3.28 GB 21.31 GB no no yes
16k 5.78 GB 23.81 GB no no no
32k 10.78 GB 28.81 GB no no no
64k 20.78 GB 38.81 GB no no no
128k 40.78 GB 58.81 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

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

DeviceMemoryVerdictQuantizationUsedSpeed
RTX PRO 6000 Blackwell
NVIDIA
96 GB Runs great Q8_0 34.67 GB 38.5 t/s
RTX 6000 Ada Generation
NVIDIA
48 GB Runs well Q8_0 34.67 GB 20.6 t/s
GeForce RTX 5090
NVIDIA
32 GB Runs great Q6_K 27.61 GB 48.5 t/s
RTX A6000
NVIDIA
48 GB Runs well Q8_0 34.67 GB 16.5 t/s
Apple M3 Ultra 96GB
Apple
96 GB Runs well Q8_0 34.64 GB 16.3 t/s
Apple M3 Ultra 256GB
Apple
256 GB Runs well Q8_0 34.64 GB 16.3 t/s
Apple M3 Ultra 512GB
Apple
512 GB Runs well Q8_0 34.64 GB 16.3 t/s
Apple M1 Ultra 64GB
Apple
64 GB Runs well Q8_0 34.64 GB 15.9 t/s
Apple M1 Ultra 128GB
Apple
128 GB Runs well Q8_0 34.64 GB 15.9 t/s
Apple M2 Ultra 64GB
Apple
64 GB Runs well Q8_0 34.64 GB 15.9 t/s
Apple M2 Ultra 128GB
Apple
128 GB Runs well Q8_0 34.64 GB 15.9 t/s
Apple M2 Ultra 192GB
Apple
192 GB Runs well Q8_0 34.64 GB 15.9 t/s
Radeon PRO W7900
AMD
48 GB Runs well Q8_0 34.67 GB 15.8 t/s
GeForce RTX 4090
NVIDIA
24 GB Runs great Q4_K_M 21.31 GB 35.5 t/s
GeForce RTX 3090 Ti
NVIDIA
24 GB Runs great Q4_K_M 21.31 GB 35.5 t/s
GeForce RTX 3090
NVIDIA
24 GB Runs great Q4_K_M 21.31 GB 33 t/s
GeForce RTX 5090 Laptop
NVIDIA
24 GB Runs great Q4_K_M 21.31 GB 31.6 t/s
Radeon RX 7900 XTX
AMD
24 GB Runs great Q4_K_M 21.31 GB 28.7 t/s
RTX A5000
NVIDIA
24 GB Runs great Q4_K_M 21.31 GB 27.1 t/s
Apple M4 Max 48GB
Apple
48 GB Runs well Q8_0 34.64 GB 10.8 t/s
Apple M4 Max 64GB
Apple
64 GB Runs well Q8_0 34.64 GB 10.8 t/s
Apple M4 Max 128GB
Apple
128 GB Runs well Q8_0 34.64 GB 10.8 t/s
Radeon RX 7900 XT
AMD
20 GB Runs great Q3_K_M 17.96 GB 28.5 t/s
Apple M1 Max 64GB
Apple
64 GB Runs well Q6_K 27.58 GB 10 t/s
Apple M2 Max 64GB
Apple
64 GB Runs well Q6_K 27.58 GB 10 t/s
Show 35 more devices
Apple M2 Max 96GB
Apple
96 GB Runs well Q6_K 27.58 GB 10 t/s
Apple M3 Max 48GB
Apple
48 GB Runs well Q6_K 27.58 GB 10 t/s
Apple M3 Max 64GB
Apple
64 GB Runs well Q6_K 27.58 GB 10 t/s
Apple M3 Max 96GB
Apple
96 GB Runs well Q6_K 27.58 GB 10 t/s
Apple M3 Max 128GB
Apple
128 GB Runs well Q6_K 27.58 GB 10 t/s
NVIDIA DGX Spark 128GB
NVIDIA
128 GB Runs well IQ4_XS 19.2 GB 10.7 t/s
GeForce RTX 5080
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 49 t/s
GeForce RTX 5070 Ti
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 45.7 t/s
GeForce RTX 5080 Laptop
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 39.2 t/s
GeForce RTX 4080 SUPER
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 37.6 t/s
GeForce RTX 4080
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 36.6 t/s
GeForce RTX 4070 Ti SUPER
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 34.3 t/s
GeForce RTX 4090 Laptop
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 29.4 t/s
Radeon RX 9070 XT
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 27.9 t/s
Radeon RX 9070
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 27.9 t/s
Radeon RX 7800 XT
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 27 t/s
Radeon RX 7900 GRE
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 24.9 t/s
GeForce RTX 5060 Ti 16GB
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 22.9 t/s
RTX A4000
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 22.9 t/s
Radeon RX 6900 XT
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 22.2 t/s
Radeon RX 6800
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 22.2 t/s
Arc A770 16GB
Intel
16 GB Just fits IQ3_XXS ! 14.87 GB 22.1 t/s
Apple M4 Pro 48GB
Apple
48 GB Runs well Q3_K_M 17.93 GB 10.6 t/s
Apple M4 Pro 64GB
Apple
64 GB Runs well Q3_K_M 17.93 GB 10.6 t/s
GeForce RTX 4060 Ti 16GB
NVIDIA
16 GB Just fits IQ3_XXS ! 14.87 GB 14.7 t/s
Jetson AGX Orin 64GB
NVIDIA
64 GB Fits, but slow Q8_0 34.67 GB 4.4 t/s
Ryzen AI Max+ 395 64GB
AMD
64 GB Fits, but slow Q8_0 34.67 GB 4.2 t/s
Ryzen AI Max+ 395 96GB
AMD
96 GB Fits, but slow Q8_0 34.67 GB 4.2 t/s
Ryzen AI Max+ 395 128GB
AMD
128 GB Fits, but slow Q8_0 34.67 GB 4.2 t/s
Radeon RX 7600 XT
AMD
16 GB Just fits IQ3_XXS ! 14.87 GB 12.5 t/s
Apple M4 Max 36GB
Apple
36 GB Just fits n/a 27.58 GB 13.7 t/s
Apple M1 Pro 16GB
Apple
16 GB Just fits n/a ! 11.2 GB 12.6 t/s
Apple M2 Pro 16GB
Apple
16 GB Just fits n/a ! 11.2 GB 12.6 t/s
Apple M4 Pro 24GB
Apple
24 GB Just fits n/a 17.93 GB 10.6 t/s
Apple M1 Max 32GB
Apple
32 GB Just fits n/a 27.58 GB 10 t/s

Can my GPU run Gemma 4 31B Instruct?

A direct answer for popular devices, each with the settings we would use.

How it compares

Other models in the same family or of a similar size, on a 12 GB card and a 24 GB card, each at the best quantization that fits.

ModelWeights at 4 bitsGeForce RTX 3060 12GBGeForce RTX 4090
Gemma 4 31B Instruct 17.6 GB does not fit well35.5 t/s at Q4_K_M
Gemma 3 27B Instruct 15.4 GB does not fit well33.7 t/s at Q6_K
Gemma 4 26B A4B Instruct 14.5 GB 37.6 t/s at Q4_K_M117 t/s at Q6_K
Gemma 3 12B Instruct 6.9 GB 26.2 t/s at Q6_K57.6 t/s at Q8_0
GPT OSS 20B 11.3 GB 65.7 t/s at MXFP4180.1 t/s at MXFP4
Qwen3 32B 18.4 GB does not fit well37.1 t/s at Q4_K_M

What to buy to run Gemma 4 31B Instruct

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

DevicePriceMemoryRuns it atSpeed
GeForce RTX 3090
NVIDIA
$700 used 24 GB Q4_K_M 33 t/s Check price
GeForce RTX 3090 Ti
NVIDIA
$800 used 24 GB Q4_K_M 35.5 t/s Check price
GeForce RTX 5090
NVIDIA
$2,200 32 GB Q6_K 48.5 t/s Check price
Apple M1 Ultra 64GB
Apple · whole machine
$2,400 64 GB Q8_0 15.9 t/s Check price
Apple M1 Ultra 128GB
Apple · whole machine
$3,400 128 GB Q8_0 15.9 t/s Check price
Apple M3 Ultra 256GB
Apple · whole machine
$5,599 256 GB Q8_0 16.3 t/s Check price
Apple M3 Ultra 512GB
Apple · whole machine
$9,499 512 GB Q8_0 16.3 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 catalog

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.

Questions people ask about Gemma 4 31B Instruct

How much VRAM does Gemma 4 31B Instruct need?

At Q4_K_M with an 8k context window, Gemma 4 31B Instruct needs about 21.31 GB: 17.58 GB of weights, 3.28 GB of KV cache and 0.45 GB of overhead. At the highest-quality file it needs about 34.67 GB.

What is the cheapest GPU that runs Gemma 4 31B Instruct?

The smallest consumer device in our catalog that fits it is the Radeon RX 7900 XT with 20 GB, running it at Q3_K_M at roughly 28.5 tokens per second.

How much does a longer context window add for Gemma 4 31B Instruct?

On the memory side, a 32k window adds 10.8 GB of KV cache on top of the weights, and the cache grows more slowly than a conventional model because of its attention design. The longest window the model supports natively is 256k tokens.