Cheapest way to run Gemma 4 12B
We earn commissions when you shop through the links below.
Gemma 4 12B needs 7.8 GB at 4-bit — cheapest rental $0.06/hr.
Quick answer
At 4-bit with an 8K-token conversation, Gemma 4 12B needs about 7.8 GB. It fits a RTX 3060 (12 GB), so if you already own one it costs nothing per token; the cheapest rental big enough is RTX 3060 on Vast.ai at $0.06 an hour.
| Option | What you need | Cost | Notes |
|---|---|---|---|
| Your own GPU | RTX 3060 (12 GB) at 4-bit (Q4_K_M), needs 7.8 GB | No GPU purchase prices in our data. Check price on Amazon Amazon affiliate link | $0 per token or hour once you own the card (power not counted) |
| Mac (unified memory) | Mac, 16 GB at 8-bit (Q8_0), needs 13.3 GB | No Mac prices in our data | $0 per token once you own it |
| Rent a GPU | RTX 3060 (12 GB total) on Vast.ai Referral link, Marketplace, verified on-demand | $0.06 per hour | Pay only while it runs. Price checked 2026-11-09 |
Fit rule: the Q4_K_M file (or the highest precision that fits) plus an 8K-token FP16 KV cache under 90% of memory, same as the calculator. Sizes and sources: Gemma 4 12B VRAM page. Rental prices: GPU prices (checked 2026-11-09). Hourly and per-token prices measure different things, so which is cheaper depends on how much you use it.
Links marked Referral link, Affiliate partner or Amazon affiliate link may earn us credit or a commission at no cost to you. Disclosure.
Precision ladder: what each quant costs
| Precision | Needs at 8K | Smallest consumer GPU | Smallest Mac | Cheapest single-GPU rental | Cheapest rental overall (any GPU count) |
|---|---|---|---|---|---|
| 16-bit (FP16/BF16) | 24.5 GB | RTX 5090 (32 GB) | Mac, 32 GB at 16-bit (FP16/BF16) | RTX A6000 (48 GB) on Runpod, $0.33/hr | RTX A6000 (48 GB) on Runpod, $0.33/hr |
| 8-bit (Q8_0) | 13.3 GB | Arc A770 16 GB (16 GB) | Mac, 16 GB at 8-bit (Q8_0) | RTX A5000 (24 GB) on Runpod, $0.16/hr | RTX A5000 (24 GB) on Runpod, $0.16/hr |
| 4-bit (Q4_K_M) | 7.8 GB | RTX 3060 (12 GB) | Mac, 16 GB at 4-bit (Q4_K_M) | RTX 3060 (12 GB) on Vast.ai, $0.06/hr | RTX 3060 (12 GB) on Vast.ai, $0.06/hr |
Every row names its precision, Mac rows included (Macs share unified memory with the system, so the same 90% rule applies). Single-GPU and multi-GPU rentals are listed separately: a multi-GPU rental needs software that splits the model across cards (llama.cpp, vLLM tensor parallel). Prices checked 2026-11-09.
How context length changes the bill (4-bit)
| Context | Needs | Cheapest rental overall |
|---|---|---|
| 8K tokens | 7.8 GB | RTX 3060 (12 GB) on Vast.ai, $0.06/hr |
| 32K tokens | 8.2 GB | RTX 3060 (12 GB) on Vast.ai, $0.06/hr |
| 128K tokens | 9.8 GB | RTX 3060 (12 GB) on Vast.ai, $0.06/hr |
What $100 of rental buys you
We list no GPU purchase prices (they change daily and we cannot check them), so this page does not compare renting with buying. At the cheapest rental that fits (RTX 3060 (12 GB) on Vast.ai, $0.06/hr), $100 of rental buys about 1667 hours of running Gemma 4 12B at 4-bit with 8K context. Electricity, storage and setup time are not counted.
Fit quirks for this model
- Part of the KV cache is a fixed 0.50 GB that does not grow with context (sliding-window or state layers), included above.
- From config.json: 48 layers, of which 8 are global (full) attention layers with 1 KV head of size 512, and 40 are sliding-window layers with 8 KV heads of size 256 and a 1,024-token window. At FP16 the global layers take 8 × 1 × 512 × 2 (K and V) × 2 bytes = 16,384 bytes per token, and the sliding layers stop growing at their window: 40 × 1,536 × 8 × 256 × 2 × 2 bytes = about 0.50 GB, fixed (llama.cpp caches window + 512-token batch). llama.cpp stores K and V separately even with attention_k_eq_v.
- Unsloth GGUF (no official or bartowski build).
- Maximum context is 262,144 tokens; longer settings are capped.
Model data checked 2026-11-03; rental prices checked 2026-11-09. For file sizes, sources and the full fit table see the Gemma 4 12B VRAM requirements page; this page is only about cost.
Get fit alerts for your GPU
Join the fit-alerts waitlist
Alerts are not running yet. Join the waitlist and pick your card once; when alerts launch we will email you once to confirm, and only after you confirm will you get the first alerts. Unsubscribe any time.
More: all cheapest-way pages · cheapest GPU rental by VRAM · Ask VRAMNeeded · Scan my GPU