Skip to content
E
Educatum
Google Dense + Sliding WindowVerified google/gemma-3-12b-it config.json

Gemma 3 12B VRAM & GPU Requirements Calculator

Gemma 3 12B requires 22.7 GiB in FP16, 11.4 GiB in FP8, and 6.9 GiB in GGUF Q4_K_M for weights alone (48L · 5:1 sliding window (1K local / 8 global) · GQA 16Q/8KV). At 8K context (batch=1, FP16 KV), KV-cache adds 0.81 GiB (7.4× smaller than MHA).

FP16 Inference (8K)
25.0 GiB
22.7 GiB weights
FP8 Weights + FP8 KV
13.2 GiB
11.4 GiB weights
GGUF Q4_K_M (8K)
9.2 GiB
6.9 GiB weights
32K KV-Cache (FP16)
2.31 GiB
7.4× vs MHA

Can Your GPU or Mac Run Gemma-3 12B? (8K Context, Batch=1)

Pre-computed fit verdict and estimated decode speed across RTX 4090/3090, Apple Silicon Unified Memory, and NVIDIA H100 clusters.

Hardware RigQ4_K_M (9.2 GiB)FP8 (13.2 GiB)FP16 (25.0 GiB)
1× RTX 4090 (23.9 GiB usable)FIT · ~95 tok/sFIT · ~62 tok/sOOM (-1G)
2× RTX 4090 / 3090 (47.8 GiB usable)FIT · ~89 tok/sFIT · ~69 tok/sFIT · ~42 tok/s
Apple M4 Max (128 GiB Unified · 96 GiB GPU)FIT · ~47 tok/sFIT · ~31 tok/sFIT · ~16 tok/s
Apple M3 Ultra (256 GiB Unified · 192 GiB GPU)FIT · ~71 tok/sFIT · ~47 tok/sFIT · ~23 tok/s
1× H100 SXM (79.6 GiB usable)FIT · ~314 tok/sFIT · ~207 tok/sFIT · ~103 tok/s
4× H100 SXM (318.4 GiB usable)FIT · ~229 tok/sFIT · ~207 tok/sFIT · ~161 tok/s
8× H100 SXM (636.8 GiB usable)FIT · ~176 tok/sFIT · ~169 tok/sFIT · ~150 tok/s
8× H200 SXM (1,123.2 GiB usable)FIT · ~181 tok/sFIT · ~175 tok/sFIT · ~161 tok/s

Interactive Gemma-3 12B VRAM & Roofline Simulator

1. Model & Workload

GQA · 12.2B Dense

48L · 5:1 sliding window (1K local / 8 global) · GQA 16Q/8KV

Execution Mode
Weight Precision (Datacenter & GGUF)
KV:
8,192 tok
1 reqs

2. Target GPU / Mac Silicon

23.9 GiB Usable · 1.01 TB/s eff.
GPU Count (Tensor Parallel)
OOM CLIFF (-1.1 GiB over limit)
25.0 / 23.9 GiB usable (105%)

Quantize weights to FP8 (~11.4 GiB) or GGUF Q4_K_M (~6.9 GiB).

Total VRAM
25.0 GiB
Weights 22.7 GiB (FP16)
KV-Cache
0.8 GiB
7.4× vs MHA
Decode / User
~31.1 tok/s
HBM Bound
Cluster Output
~31 tok/s
AI 1.0 FLOP/B

VRAM Allocation vs. Hardware Capacity

Binary GiB (1 GiB = 2³⁰ B) · Usable VRAM excludes ECC/OS & per-GPU CUDA/NCCL buffers

Dashed line = Usable VRAM
Used: 25.0 GiB · Usable: 23.9 GiB (105%) 23.9 GiB Usable Weights: 22.7 GiBKV-Cache: 0.8 GiBAct + CUDA: 1.5 GiB educatum.com/kv-cache

Decode Arithmetic Intensity Roofline

AI 1.0 vs Ridge 327 FLOPs/B
1416642561024 Ridge: 327 FLOPs/B · 330 TFLOPS Memory-Bandwidth Bound (1.0 FLOP/B) Arithmetic Intensity (FLOPs / Byte, log scale) educatum.com/kv-cache
Canonical URL stays clean; click Copy Shareable Link to share your exact slider config.
Gemma-3 12B IT · KV_tok (5:1 window) = (8G × 8192 + 40L × 1024)/8192 = 104.0 KiB/tok eff. (7.4× vs MHA)
Decode Step Read: 22.7 GiB active weights + 0.81 GiB KV-cache → AI = 0.97 FLOPs/Byte (Memory-Bandwidth Bound; BW in decimal GB/s)

Compare Other LLM VRAM Requirements

All 14 Models →

Frequently Asked Questions

Can 1× or 2× RTX 4090 (24 GiB / 48 GiB) run Gemma 3 12B?

At 8K context (batch=1) in GGUF Q4_K_M, Gemma 3 12B needs 9.2 GiB total VRAM including CUDA runtime overhead (6.9 GiB weights). Single 23.9 GiB usable RTX 4090: Fits at ~95 tok/s. Dual 47.8 GiB usable (2× 4090/3090): Fits Q4_K_M cleanly (~89 tok/s).

Can an Apple M4 Max (128 GiB) Mac Studio / MacBook Pro run Gemma 3 12B?

An Apple M4 Max 128 GiB reserves 96 GiB wired GPU memory by default. In GGUF Q4_K_M (9.2 GiB needed at 8K), it fits on M4 Max 128 GiB at ~47.3 tok/s.

How much KV-cache does Gemma 3 12B use at 32K context?

Gemma 3 12B uses GQA with a 5:1 sliding window (1,024 local tokens), giving a 7.4× KV-cache reduction vs standard MHA. At 32,768 context (batch=1, FP16 KV), KV-cache occupies 2.31 GiB.

Try keywords like RoPE, FlashAttention, DPO, or Blind 75.