Skip to content
Run LLM Locally

Model · Google

Gemma 2 9B IT: VRAM and hardware requirements

At Q4_K_M with an 8K context, Gemma 2 9B IT needs about 8.6 GB: a GPU with 10 GB or more runs it entirely in VRAM.

  • Parameters9.24B
  • Max context8K
  • LicenseGemma Terms of Use

Specifications

Organization
Google
Architecture
gemma2
Released
June 2024
Layers
42
Hidden size
3584
Attention heads
16
KV heads
8
Head dimension
256
Vocabulary
256,000
KV cache per 1K tokens (f16)
0.328 GB

Official specData updated 24 days agoSource: Hugging Face config.json + model card

Quantizations and memory

Gemma 2 9B IT: memory by quantization at 8K context
QuantizationFile sizeMemory neededMinimum GPU memoryQuality
BF16Not available~21.2 GB24 GBReference (unquantized)
Q8_09.2 GB~12.7 GB16 GBNear-lossless
Q6_K7.1 GB~10.5 GB11 GBNear-lossless
Q5_K_M6.2 GB~9.5 GB10 GBVery good
Q4_K_MMost used5.4 GB~8.6 GB10 GBGood — the usual choice
IQ4_XS4.8 GB~8.1 GB10 GBGood — the usual choice
Q3_K_M4.4 GB~7.6 GB10 GBNoticeable loss
Q2_K3.5 GB~6.7 GB8 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 2 9B IT

Gemma 2 9B IT Q4_K_M · 8K context, one GPU
RTX 509032 GB · 64 GB RAM~8.7 GB · 134–213 tok/s estimateExcellent
RTX 409024 GB · 64 GB RAM~8.7 GB · 89–130 tok/s estimateExcellent
RTX 309024 GB · 64 GB RAM~8.7 GB · 84–122 tok/s estimateExcellent
RX 7900 XTX24 GB · 64 GB RAM~8.8 GB · 70–109 tok/s estimateExcellent
RTX 5060 Ti 16 GB16 GB · 64 GB RAM~8.7 GB · 45–62 tok/s estimateExcellent
RTX 5070 Ti16 GB · 64 GB RAM~8.7 GB · 81–117 tok/s estimateExcellent
RTX 508016 GB · 64 GB RAM~8.7 GB · 85–125 tok/s estimateExcellent
RTX 4060 Ti 16 GB16 GB · 64 GB RAM~8.7 GB · 30–40 tok/s estimateExcellent
RTX 4070 Ti SUPER16 GB · 64 GB RAM~8.7 GB · 64–90 tok/s estimateExcellent
RX 9070 XT16 GB · 64 GB RAM~8.8 GB · 52–77 tok/s estimateExcellent
RTX 3060 12 GB12 GB · 64 GB RAM~8.7 GB · 37–50 tok/s estimateExcellent
RTX 407012 GB · 64 GB RAM~8.7 GB · 50–69 tok/s estimateExcellent
RTX 507012 GB · 64 GB RAM~8.7 GB · 64–90 tok/s estimateExcellent
RTX 40608 GB · 64 GB RAM~8.7 GB · 12–22 tok/s estimateCPU/GPU offload

Macs that run Gemma 2 9B IT

Gemma 2 9B IT Q4_K_M · 8K context
M3 Ultra (80-core GPU) · 512 GBMac Studio~8.5 GB · 60–111 tok/s estimateExcellent
M4 Max (40-core GPU) · 128 GBMacBook Pro 14, MacBook Pro 16~8.5 GB · 44–74 tok/s estimateExcellent
M3 Max (40-core GPU) · 128 GBMacBook Pro 14, MacBook Pro 16~8.5 GB · 34–54 tok/s estimateExcellent
M4 Pro (20-core GPU) · 64 GBMac mini, MacBook Pro 14~8.5 GB · 24–37 tok/s estimateExcellent
M4 Max (32-core GPU) · 36 GBMacBook Pro 14, MacBook Pro 16~8.5 GB · 34–56 tok/s estimateExcellent
M4 · 32 GBMacBook Air, MacBook Pro 14~8.5 GB · 11–17 tok/s estimateExcellent
M5 · 32 GBMacBook Pro 14~8.5 GB · 14–21 tok/s estimateExcellent
M3 · 24 GBMacBook Air, MacBook Pro 14~8.5 GB · 9.5–14 tok/s estimateCompatible

EstimateData updated 24 days agoSource: Run LLM Locally engine

Limits in plain words

The KV cache grows with context: at 8K it adds about 2 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.

GeForce RTX 3080 (10 GB)

NVIDIA

CompatibleRuns Gemma 2 9B IT Q4_K_M entirely in memory

Price not available

Availability unknown

View on amazon.com

Affiliate link

Radeon RX 7600 XT

AMD

ExcellentRuns Gemma 2 9B 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

ExcellentRuns Gemma 2 9B 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 2 9B IT need?
About 8.6 GB at Q4_K_M with an 8K context, including the KV cache and runtime overhead. At Q8_0 it needs about 12.7 GB. A longer context adds more: about 2 GB of KV cache at 32K.
Can Gemma 2 9B IT run on a Mac?
Yes on a Mac whose GPU can use at least 8.5 GB, e.g. M3 24 GB. macOS lets the GPU use about two thirds to three quarters of unified memory by default.
How fast is Gemma 2 9B IT?
On a RTX 4090, we estimate 89–130 tok/s at Q4_K_M. This is an estimate from memory bandwidth (confidence low) until benchmarks are imported.