Gemma 3 · Gemma · HF: google/gemma-3-27b-it
Gemma 3 27B IT — VRAM, KV Cache & Hardware Matrix
Serverless API Rate
$0.08 in / $0.35 out per 1M
Parameters
27.4B Dense
Attention
GQA (16 KV / 32 Q)
Layers × Hidden
62 × 5376
Max Native Context
128k tokens
MoE Experts
N/A (Dense)
Quantization Memory Footprint
| Quantization | BPW | Weights Only | Total @ 8k Ctx | Total @ 32k Ctx | Quality |
|---|---|---|---|---|---|
| FP16 | 16.00 | 52.06 GiB | 54.58 GiB | 56.45 GiB | Lossless Reference |
| Q8_0 | 8.50 | 27.66 GiB | 30.17 GiB | 32.05 GiB | Near-Lossless |
| Q6_K | 6.57 | 21.38 GiB | 23.90 GiB | 25.77 GiB | High Precision |
| Q5_K_M | 5.69 | 18.51 GiB | 21.03 GiB | 22.91 GiB | Balanced High |
| Q4_K_M | 4.85 | 15.78 GiB | 18.30 GiB | 20.17 GiB | Recommended 4-bit |
| MLX_4BIT | 4.50 | 14.64 GiB | 17.16 GiB | 19.04 GiB | Apple Silicon Optimized |
| IQ4_XS | 4.25 | 13.83 GiB | 16.35 GiB | 18.22 GiB | Compact 4-bit |
| Q3_K_M | 3.91 | 12.72 GiB | 15.24 GiB | 17.12 GiB | Aggressive Compression |
Hardware Compatibility & Speed Leaderboard (Q4_K_M @ 32k Context)
| Hardware | Status | Total / Limit | Decode | TTFT (4k) | Max Safe Ctx | Inspect |
|---|---|---|---|---|---|---|
| Cloud NVIDIA H200 SXM (141 GB) | COMFORTABLE | 20.2 / 140.4 GiB | 201.0 tok/s | 0.36s | 128k | Simulate → |
| Cloud NVIDIA H100 SXM (80 GB) | COMFORTABLE | 20.2 / 79.4 GiB | 140.3 tok/s | 0.36s | 128k | Simulate → |
| Cloud NVIDIA A100 SXM (80 GB) | COMFORTABLE | 20.2 / 79.4 GiB | 83.3 tok/s | 1.13s | 128k | Simulate → |
| NVIDIA RTX PRO 6000 Blackwell (96 GB) | COMFORTABLE | 20.2 / 95.0 GiB | 75.0 tok/s | 1.41s | 128k | Simulate → |
| NVIDIA RTX 5090 (32 GB) | COMFORTABLE | 20.2 / 31.0 GiB | 73.2 tok/s | 1.75s | 128k | Simulate → |
| NVIDIA RTX 4090 (24 GB) | COMFORTABLE | 20.2 / 23.0 GiB | 41.2 tok/s | 2.21s | 68k | Simulate → |
| NVIDIA RTX 3090 (24 GB Used) | COMFORTABLE | 20.2 / 23.0 GiB | 37.3 tok/s | 5.33s | 68k | Simulate → |
| AMD Radeon RX 7900 XTX (24 GB) | COMFORTABLE | 20.2 / 23.0 GiB | 36.4 tok/s | 3.68s | 68k | Simulate → |
| Cloud NVIDIA L40S (48 GB) | COMFORTABLE | 20.2 / 47.4 GiB | 35.3 tok/s | 1.01s | 128k | Simulate → |
| Apple Mac Studio M3 Ultra (256 GB) | COMFORTABLE | 20.0 / 199.7 GiB | 31.8 tok/s | 6.96s | 128k | Simulate → |
| Apple Mac Studio M3 Ultra (512 GB) | COMFORTABLE | 20.0 / 399.4 GiB | 31.8 tok/s | 6.96s | 128k | Simulate → |
| 2x NVIDIA RTX 3090 Rig (48 GB) | COMFORTABLE | 20.2 / 46.6 GiB | 31.4 tok/s | 6.55s | 128k | Simulate → |
| Apple Mac Studio M2 Ultra (192 GB) | COMFORTABLE | 20.0 / 149.8 GiB | 31.1 tok/s | 7.68s | 128k | Simulate → |
| Apple Mac Studio M4 Max (64 GB) | COMFORTABLE | 20.0 / 49.9 GiB | 20.9 tok/s | 10.59s | 128k | Simulate → |
| Apple Mac Studio M4 Max (128 GB) | COMFORTABLE | 20.0 / 99.8 GiB | 20.9 tok/s | 10.59s | 128k | Simulate → |
| Apple MacBook Pro M3 Max (64 GB) | COMFORTABLE | 20.0 / 49.9 GiB | 15.2 tok/s | 14.18s | 128k | Simulate → |
| Apple MacBook Pro M3 Max (128 GB) | COMFORTABLE | 20.0 / 99.8 GiB | 15.2 tok/s | 14.18s | 128k | Simulate → |
| Apple Mac Mini M4 Pro (48 GB) | COMFORTABLE | 20.0 / 37.4 GiB | 10.1 tok/s | 21.87s | 128k | Simulate → |
| Apple Mac Mini M4 Pro (64 GB) | COMFORTABLE | 20.0 / 49.9 GiB | 10.1 tok/s | 21.87s | 128k | Simulate → |
| Ryzen AI Max+ 395 Strix Halo (128 GB) | COMFORTABLE | 20.0 / 96.0 GiB | 9.4 tok/s | 7.88s | 128k | Simulate → |
| Ryzen AI Max+ 395 Strix Halo (64 GB) | COMFORTABLE | 20.0 / 48.0 GiB | 9.4 tok/s | 7.88s | 128k | Simulate → |
| Ryzen AI 9 HX 370 Mini-PC (64 GB) | COMFORTABLE | 20.0 / 48.0 GiB | 4.2 tok/s | 22.55s | 128k | Simulate → |
| NVIDIA RTX 5080 (16 GB) | OOM | 20.2 / 15.0 GiB | OOM | — | OOM | Simulate → |
| NVIDIA RTX 5070 Ti (16 GB) | OOM | 20.2 / 15.0 GiB | OOM | — | OOM | Simulate → |
| NVIDIA RTX 5060 Ti (16 GB) | OOM | 20.2 / 15.0 GiB | OOM | — | OOM | Simulate → |
| NVIDIA RTX 3060 (12 GB) | OOM | 20.2 / 11.0 GiB | OOM | — | OOM | Simulate → |
| Apple Mac Mini M4 (16 GB) | OOM | 20.0 / 10.0 GiB | OOM | — | OOM | Simulate → |
| Apple Mac Mini M4 (24 GB) | OOM | 20.0 / 18.0 GiB | OOM | — | 26k | Simulate → |
Interactive Gemma 3 27B IT Simulator
27.4B Dense · GQA
1792 GB/s · 250 TFLOPS
3. Weight Quantization
4.85 bpw
4. KV Cache
32,768 tok
Compute Roofline
COMFORTABLE FIT Memory-Bandwidth Bound
Max Safe Ctx: 128k
Memory Allocation Footprint 20.17 / 95.00 GiB usable
Weights: 15.78 GiB
KV Cache: 2.91 GiB
Overhead: 1.49 GiB
Headroom: 74.83 GiB
Decode Speed
75.0
tok/s (batch=1)
Prefill Speed
2989
prompt tok/s
TTFT Latency
1.41s
for 4,096 tok
Active Params
27.4B
of 27.4B total
llama.cpp Server Command
llama-server -hf google/gemma-3-27b-it:Q4_K_M -ngl 99 -fa on -c 32768 --port 8080 | Context | KV Cache | Total VRAM | Decode | Status |
|---|---|---|---|---|
| 4k | 0.72 GiB | 17.62 GiB | 85.0 tok/s | COMFORTABLE |
| 8k | 1.03 GiB | 18.30 GiB | 83.4 tok/s | COMFORTABLE |
| 16k | 1.66 GiB | 18.92 GiB | 80.4 tok/s | COMFORTABLE |
| 32k | 2.91 GiB | 20.17 GiB | 75.0 tok/s | COMFORTABLE |
| 64k | 5.41 GiB | 22.67 GiB | 66.2 tok/s | COMFORTABLE |
| 128k | 10.41 GiB | 27.67 GiB | 53.5 tok/s | COMFORTABLE |
Buy-vs-Cloud-vs-API Monthly TCO Break-Even
USE SERVERLESS APIOwn Hardware/mo
$165.38
60.2h active + power
Cloud GPU/mo
$128.05
@$1.85/hr spot/pod
Serverless API/mo
$9.25
API cheaper
Recommended Hardware & Cloud Deployment
Contextual to fit statusEngineering FAQ — Gemma 3 27B IT
How much VRAM does Gemma 3 27B IT require in Q4_K_M?
Gemma 3 27B IT weights occupy 15.78 GiB in Q4_K_M. Including 32k FP16 KV cache and runtime buffers, total memory is 20.17 GiB.
What is the cheapest local hardware that runs Gemma 3 27B IT?
NVIDIA RTX PRO 6000 Blackwell (96 GB) (96 GB) runs Gemma 3 27B IT Q4_K_M at ~75.0 tok/s decode and 1.41s TTFT.
How does Gemma 3 27B IT scale KV cache at long context?
Gemma 3 27B IT uses hybrid sliding-window attention (1024 tokens) across most layers, keeping 32k-128k KV memory compact.