Gemma 4 12B — VRAM requirements & what it costs to run
Bottom line: at q4_k_m with 8k context you need ≈ 8.6 GiB; smallest single accelerator in our catalog: RTX 3060 12GB.
Quantization table (GiB)
| quant | weights | total @8k | need @8k | smallest fit |
|---|---|---|---|---|
| native | 22.28 | 25.66 | 25.7 | RTX 5090 32GB |
| bf16 | 22.28 | 25.66 | 25.7 | RTX 5090 32GB |
| fp8 | 11.14 | 13.41 | 13.4 | RTX 4060 Ti 16GB |
| q8_0 | 11.83 | 14.17 | 14.2 | RTX 4060 Ti 16GB |
| q6_k | 9.13 | 11.2 | 11.2 | RTX 3060 12GB |
| q5_k_m | 7.89 | 9.84 | 9.8 | RTX 3060 12GB |
| q4_k_m | 6.74 | 8.57 | 8.6 | RTX 3060 12GB |
| q3_k_m | 5.44 | 7.14 | 7.1 | RTX 3060 12GB |
| q2_k | 4.66 | 6.28 | 6.3 | RTX 3060 12GB |
Dataset: modelvram.com open dataset (CC BY 4.0 / MIT), retrieved 2026-10-20. "total @8k" already includes KV cache + runtime overhead per dataset methodology; we extrapolate KV linearly by context (formula).
KV-cache scaling at q4_k_m (total GiB)
| context | total |
|---|---|
| 4k | 8.5 |
| 8k | 8.6 |
| 16k | 8.7 |
| 32k | 8.9 |
| 128k | 10.4 |
Cost: what renting costs, where we can source it
Cheapest listed rental that fits: RunPod RTX 5090 32GB @ $1.39/h — source: RunPod: our own fetch of RunPod’s pricing page (checked 2026-11-13); figures are its Secure Cloud tier (the page’s default selection), variants named per card. Lambda: our own fetch of lambda.com/pricing (checked 2026-11-17) — the list that took effect 2026-11-16, now in force, with the mounting form named per card. Vast.ai: priced per listing by hosts; its pricing page is JS-rendered — no extractable static figure (checked 2026-10-22). Superseded basis for RunPod rows: modelvram.com table (stated 2026-09-29, re-fetched by us 2026-10-22), CC BY 4.0
Running Gemma 4 12B with Ollama
Typical q4_k_m GGUF download ≈ 6.74 GiB (weights, dataset figure); expect ≥ 8.6 GiB resident at 8k context. Find tags: ollama.com/search (we do not mirror tag lists — sizes on Ollama are their numbers, ours are dataset-sourced).
Picking a runtime? Ollama vs llama.cpp · Ollama vs LM Studio · Ollama vs vLLM · vLLM vs llama.cpp (official-docs comparison, checked 2026-10-23).
FAQ
How much VRAM does Gemma 4 12B need?
At q4_k_m with an 8k context it needs about 8.6 GiB including KV cache and runtime overhead; the smallest card in our catalog that fits is RTX 3060 12GB. Numbers come from the modelvram.com open dataset (CC BY 4.0, retrieved 2026-10-20) and our published formula (https://llmbudgetlab.com/method/).
Does Gemma 4 12B fit in 8GB, 12GB or 16GB of VRAM?
At 8k context, read off the table above: the 8 GB card fits q3_k_m (7.14 GiB); the 12 GB card fits q6_k (11.2 GiB); the 16 GB card fits q8_0 (14.17 GiB). Two caveats, ours and not the dataset’s: we compare against the card’s nominal size, so OS and driver reservations are not deducted, and our method says treat any single number as ±10–15% and confirm it on your own run. Want margin? Drop one quant.
Can I run Gemma 4 12B on a Mac?
Use the calculator: macOS caps GPU-usable memory well below your spec-sheet unified RAM. We count 2/3 of unified (3/4 above 36GB) as a deliberately conservative rule of ours, not an Apple constant — compare required GiB against usable memory, then confirm on your own machine with sysctl iogpu.wired_limit_mb (why).
Is renting a GPU cheaper than buying one for Gemma 4 12B?
Rental from $1.39/h (RunPod Secure Cloud, checked 2026-11-13) — plug both into the calculator's break-even field; buy price and electricity are yours to enter because we refuse to guess market prices.
**Gemma 4 12B** needs ~8.6 GiB VRAM at q4_k_m (8k context) → minimum RTX 3060 12GB. Check & cost-compare: [LLM Budget Lab](https://llmbudgetlab.com/models/gemma-4-12b/)or grab the SVG badge →
More: builds under $1000 · under $1500 · used GPUs & break-even · RTX 4090 · RTX 5090