Skip to content
Run LLM Locally

Model · Google

Gemma 4 31B IT: VRAM and hardware requirements

At Q4_K_M with an 8K context, Gemma 4 31B IT needs about 21.3 GB: a GPU with 24 GB or more runs it entirely in VRAM.

  • Parameters31.3B
  • Max context256K
  • LicenseApache-2.0

Specifications

Organization
Google
Architecture
gemma4
Released
March 2026
Layers
60
Hidden size
5376
Attention heads
32
KV heads
16
Head dimension
256
Vocabulary
262,144
KV cache per 1K tokens (f16)
0.859 GB

Official specData updated todaySource: Hugging Face config.json + model card

Quantizations and memory

Gemma 4 31B IT: memory by quantization at 8K context
QuantizationFile sizeMemory neededMinimum GPU memoryQuality
BF1657.2 GB~63.8 GB80 GBReference (unquantized)
Q8_030.4 GB~35.1 GB48 GBNear-lossless
Q6_K23.5 GB~27.7 GB32 GBNear-lossless
Q5_K_M20.2 GB~24.4 GB32 GBVery good
Q4_K_MMost used17.1 GB~21.3 GB24 GBGood — the usual choice
IQ4_XS15.2 GB~19.6 GB20 GBGood — the usual choice
Q3_K_M13.7 GB~17.9 GB20 GBNoticeable loss
Q2_KNot available~14.7 GB16 GBSignificant loss

File sizes: not available until imported from the model repository. Memory = weights (estimated from bits per weight) + KV cache + runtime overhead + safety margin. (BF16 ≈ 16 bpw, Q8_0 ≈ 8.5 bpw, Q6_K ≈ 6.57 bpw, Q5_K_M ≈ 5.7 bpw, Q4_K_M ≈ 4.9 bpw, IQ4_XS ≈ 4.46 bpw, Q3_K_M ≈ 4 bpw, Q2_K ≈ 3.17 bpw)

Q4, Q5 or Q8: how to choose a quantization

GPUs that run Gemma 4 31B IT

Gemma 4 31B IT Q4_K_M · 8K context, one GPU
RTX 509032 GB · 64 GB RAM~20.5 GB · 58–83 tok/s estimateExcellent
RTX 409024 GB · 64 GB RAM~20.5 GB · 36–49 tok/s estimateCompatible
RTX 309024 GB · 64 GB RAM~20.5 GB · 33–46 tok/s estimateCompatible
RX 7900 XTX24 GB · 64 GB RAM~20.5 GB · 29–43 tok/s estimateCompatible
RTX 5060 Ti 16 GB16 GB · 64 GB RAM~20.5 GB · 3.5–6.5 tok/s estimateCPU/GPU offload
RTX 5070 Ti16 GB · 64 GB RAM~20.5 GB · 4–7.5 tok/s estimateCPU/GPU offload
RTX 508016 GB · 64 GB RAM~20.5 GB · 4–7.5 tok/s estimateCPU/GPU offload
RTX 4060 Ti 16 GB16 GB · 64 GB RAM~20.5 GB · 3–6 tok/s estimateCPU/GPU offload
RTX 4070 Ti SUPER16 GB · 64 GB RAM~20.5 GB · 3.5–7 tok/s estimateCPU/GPU offload
RX 9070 XT16 GB · 64 GB RAM~20.5 GB · 3.5–7 tok/s estimateCPU/GPU offload
RTX 3060 12 GB12 GB · 64 GB RAM~20.5 GB · 2–4 tok/s estimatePossible but slow
RTX 407012 GB · 64 GB RAM~20.5 GB · 2–4 tok/s estimatePossible but slow
RTX 507012 GB · 64 GB RAM~20.5 GB · 2–4.5 tok/s estimatePossible but slow
RTX 40608 GB · 64 GB RAM~20.5 GB · 1.5–3 tok/s estimatePossible but slow

Macs that run Gemma 4 31B IT

Gemma 4 31B IT Q4_K_M · 8K context
M3 Ultra (80-core GPU) · 512 GBMac Studio~20.3 GB · 24–40 tok/s estimateExcellent
M4 Max (40-core GPU) · 128 GBMacBook Pro 14, MacBook Pro 16~20.3 GB · 17–26 tok/s estimateExcellent
M3 Max (40-core GPU) · 128 GBMacBook Pro 14, MacBook Pro 16~20.3 GB · 13–20 tok/s estimateExcellent
M4 Max (32-core GPU) · 36 GBMacBook Pro 14, MacBook Pro 16~20.3 GB · 13–20 tok/s estimateExcellent
M4 Pro (20-core GPU) · 64 GBMac mini, MacBook Pro 14~20.3 GB · 9–13 tok/s estimateCompatible
M4 · 32 GBMacBook Air, MacBook Pro 14~20.3 GB · 4–6 tok/s estimateCompatible
M5 · 32 GBMacBook Pro 14~20.3 GB · 5–7.5 tok/s estimateCompatible
M3 · 24 GBMacBook Air, MacBook Pro 14~20.3 GB · No dataIncompatible

EstimateData updated 40 days agoSource: Run LLM Locally engine

Limits in plain words

The KV cache grows with context: at 32K it adds about 3.3 GB on top of the weights.

With under 8 GB of VRAM, use a smaller quantization or a smaller model of the same family.

Where to buy

Prices and links follow the market you choose.

Radeon RX 7900 XTX

AMD

CompatibleRuns Gemma 4 31B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

AMD Ryzen AI Max+ 395

Unified memory PC

CompatibleRuns Gemma 4 31B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

GeForce RTX 2080 Ti

Lowest memory tier

Compatible with limitsRuns Gemma 4 31B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

No current offer imported for this market: the link opens a marketplace search.

Frequently asked questions

How much VRAM does Gemma 4 31B IT need?
About 21.3 GB at Q4_K_M with an 8K context, including the KV cache and runtime overhead. At Q8_0 it needs about 35.1 GB. A longer context adds more: about 3.3 GB of KV cache at 32K.
Can Gemma 4 31B IT run on a Mac?
Yes on a Mac whose GPU can use at least 20.3 GB, e.g. M4 32 GB. macOS lets the GPU use about two thirds to three quarters of unified memory by default.
How fast is Gemma 4 31B IT?
On a RTX 4090, we estimate 36–49 tok/s at Q4_K_M. This is an estimate from memory bandwidth (confidence low) until benchmarks are imported.