← Interactive LLM VRAM Calculator — try your own context length & quantization

How much VRAM to run Gemma 2 27B? (FP16/Q8/Q6/Q4 requirements)

Architecture: 46 layers, GQA with 16 KV heads; alternating sliding-window attention. Figures are approximations for weights + an 8k-token FP16 KV cache + ~1 GB runtime overhead, based on typical published GGUF sizes. Actual usage varies by runtime and settings.

QuantizationWeightsTotal VRAM (8k context)Fits on (example)
FP16
full precision (16-bit)
~54 GB~58 GB2×RTX 5090 (64 GB)
Q8_0
8-bit
~29 GB~33 GB2×RTX 3090 or RTX A6000 (48 GB)
Q6_K
~6.6-bit
~22 GB~26 GBRTX 5090 (32 GB)
Q5_K_M
~5.7-bit
~19 GB~23 GBRTX 3090 / RTX 4090 (24 GB)
Q4_K_M
~4.8-bit
~17 GB~21 GBRTX 3090 / RTX 4090 (24 GB)

How much VRAM do I need to run Gemma 2 27B?

You need roughly ~21 GB of VRAM to run Gemma 2 27B at Q4_K_M with an 8k-token context — that fits on RTX 3090 / RTX 4090 (24 GB). At Q8_0 plan for about ~33 GB, and full FP16 needs around ~58 GB. Gemma 2 27B has a relatively large KV cache (16 KV heads). The figures here assume a full 8k FP16 cache on every layer; llama.cpp builds with sliding-window-aware allocation use somewhat less. Q4_K_M fits comfortably on a 24 GB card.

What affects these numbers?

Three things: the quantization (bytes per parameter), the KV cache (grows linearly with context length — the table assumes 8k tokens), and runtime overhead. Longer contexts need more memory; quantizing the KV cache (e.g. q8_0 cache in llama.cpp) roughly halves that part. Use the interactive calculator to plug in your exact context length and quantization.