Gemma · Gemma 2 · 27.2B parameters
Gemma 2 27B VRAM requirements
Gemma 2 27B has 46 layers and uses grouped-query attention (16 KV heads). At Q4_K_M the weights come to 15.4 GB, and the best quantisation that fits a 24 GB card is Q5_K_M.
Runs comfortably
18.4 GB of 21.8 GB · 85%Gemma 2 27B at Q4_K_M leaves 3.3 GB spare on a RTX 4090. There is room to raise the context length or move up a quantisation level.
Every quantisation of Gemma 2 27B on a RTX 4090
Highlighted row is the highest quality that still fits at 8K context.
| Quantisation | bpw | Weights | Total | Verdict | Max ctx | tok/s |
|---|---|---|---|---|---|---|
| FP16 / BF16 | 16.00 | 50.7 GB | 53.7 GB | Won't fit | — | 1.12 |
| INT8 / W8A8 | 8.50 | 26.6 GB | 29.6 GB | Won't fit | — | 3.91 |
| Q8_0 (GGUF) | 8.50 | 26.6 GB | 29.6 GB | Won't fit | — | 3.91 |
| FP8 (E4M3) | 8.00 | 25.3 GB | 28.3 GB | Won't fit | — | 4.64 |
| Q6_K | 6.56 | 20.8 GB | 23.8 GB | Won't fit | — | 10.4 |
| Q5_K_M | 5.67 | 18.0 GB | 20.9 GB | Fits, but tight | 8K | 30.9 |
| Q5_K_S | 5.52 | 17.5 GB | 20.5 GB | Fits, but tight | 8K | 31.7 |
| Q4_K_M | 4.85 | 15.4 GB | 18.4 GB | Runs comfortably | 8K | 35.5 |
| AWQ 4-bit | 4.25 | 15.1 GB | 18.1 GB | Runs comfortably | 8K | 36.2 |
| GPTQ 4-bit | 4.25 | 15.1 GB | 18.1 GB | Runs comfortably | 8K | 36.2 |
| MXFP4 | 4.25 | 15.1 GB | 18.1 GB | Runs comfortably | 8K | 36.2 |
| Q4_K_S | 4.58 | 14.6 GB | 17.6 GB | Runs comfortably | 8K | 37.2 |
| Q4_0 | 4.55 | 14.5 GB | 17.5 GB | Runs comfortably | 8K | 37.4 |
| IQ4_XS | 4.25 | 13.6 GB | 16.6 GB | Runs comfortably | 8K | 39.7 |
| Q3_K_M | 3.91 | 12.6 GB | 15.6 GB | Runs comfortably | 8K | 42.6 |
| IQ3_M | 3.70 | 12.0 GB | 14.9 GB | Runs comfortably | 8K | 44.6 |
| IQ3_XXS | 3.06 | 10.0 GB | 13.0 GB | Runs comfortably | 8K | 52.0 |
| Q2_K | 2.63 | 8.7 GB | 11.7 GB | Runs comfortably | 8K | 58.5 |
| IQ2_XXS | 2.06 | 7.0 GB | 10.0 GB | Runs comfortably | 8K | 70.3 |
| IQ1_M | 1.75 | 6.1 GB | 9.0 GB | Runs comfortably | 8K | 78.9 |
Gemma 2 27B on each GPU
Q4_K_M weights at 8K context, single card, monitor attached.
| GPU | VRAM | GB/s | Verdict | Max ctx | tok/s |
|---|---|---|---|---|---|
| H100 SXM 80GB | 80 | 3350 | Runs comfortably | 8K | 134 |
| A100 80GB | 80 | 2039 | Runs comfortably | 8K | 74.0 |
| RTX 5090 | 32 | 1792 | Runs comfortably | 8K | 68.8 |
| RTX 4090 | 24 | 1008 | Runs comfortably | 8K | 35.5 |
| RTX 3090 | 24 | 936 | Runs comfortably | 8K | 34.4 |
| Radeon RX 7900 XTX | 24 | 960 | Runs comfortably | 8K | 32.1 |
| L40S | 48 | 864 | Runs comfortably | 8K | 30.4 |
| RTX A6000 | 48 | 768 | Runs comfortably | 8K | 28.2 |
| Mac Studio M3 Ultra 256GB | 256 | 819 | Runs comfortably | 8K | 27.8 |
| Mac Studio M4 Max 128GB | 128 | 546 | Runs comfortably | 8K | 20.7 |
| NVIDIA DGX Spark (GB10) | 128 | 273 | Runs comfortably | 8K | 10.7 |
| Mac Mini M4 Pro 48GB | 48 | 273 | Runs comfortably | 8K | 10.4 |
| Ryzen AI Max+ 395 128GB | 128 | 256 | Runs comfortably | 8K | 7.95 |
| RTX 5080 | 16 | 960 | Won't fit | — | 7.55 |
| RTX 5070 Ti | 16 | 896 | Won't fit | — | 7.47 |
| RTX 4080 Super | 16 | 736 | Won't fit | — | 6.56 |
| RTX 5060 Ti 16GB | 16 | 448 | Won't fit | — | 6.48 |
| RTX 4070 Ti Super | 16 | 672 | Won't fit | — | 6.45 |
| RTX 4060 Ti 16GB | 16 | 288 | Won't fit | — | 5.13 |
| RTX 5070 | 12 | 672 | Won't fit | — | 4.40 |
| RTX 3060 12GB | 12 | 360 | Won't fit | — | 3.90 |
| RTX 4070 Super | 12 | 504 | Won't fit | — | 3.89 |
| RTX 4070 | 12 | 504 | Won't fit | — | 3.89 |
| RTX 3080 10GB | 10 | 760 | Won't fit | — | 3.47 |
| Arc B580 | 12 | 456 | Won't fit | — | 3.26 |
Architecture
| Parameters | 27.2B |
| Layers | 46 |
| Hidden size | 4608 |
| Attention heads / KV heads | 32 / 16 |
| Head dimension | 128 |
| Vocabulary | 256,000 |
| Trained context | 8K |
| Sliding window | 4096 (every 2th layer is global) |
| KV cache per 1K tokens | 0 GB |
| Hugging Face | google/gemma-2-27b-it |
The Gemma family
Google's open models. Two things dominate the memory: a 262k vocabulary — on Gemma 3 1B the embedding table is about a third of the file — and sliding-window attention, where only every sixth layer of Gemma 3 sees the full context, and every second layer on Gemma 2. The cache grows far more slowly than the context length suggests.
huggingface.co/google · ai.google.dev/gemma · all 6 Gemma models