VRAMNeeded Calculator

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.

OptionWhat you needCostNotes
Your own GPURTX 3060 (12 GB) at 4-bit (Q4_K_M), needs 7.8 GBNo 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 GBNo Mac prices in our data$0 per token once you own it
Rent a GPURTX 3060 (12 GB total) on Vast.ai Referral link, Marketplace, verified on-demand$0.06 per hourPay 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

PrecisionNeeds at 8KSmallest consumer GPUSmallest MacCheapest single-GPU rentalCheapest rental overall (any GPU count)
16-bit (FP16/BF16)24.5 GBRTX 5090 (32 GB)Mac, 32 GB at 16-bit (FP16/BF16)RTX A6000 (48 GB) on Runpod, $0.33/hrRTX A6000 (48 GB) on Runpod, $0.33/hr
8-bit (Q8_0)13.3 GBArc A770 16 GB (16 GB)Mac, 16 GB at 8-bit (Q8_0)RTX A5000 (24 GB) on Runpod, $0.16/hrRTX A5000 (24 GB) on Runpod, $0.16/hr
4-bit (Q4_K_M)7.8 GBRTX 3060 (12 GB)Mac, 16 GB at 4-bit (Q4_K_M)RTX 3060 (12 GB) on Vast.ai, $0.06/hrRTX 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.

We store only your email and the GPU or VRAM you pick (plus the page you signed up from). A one-way hash of your IP is used for rate limiting only, for about 15 minutes. Unconfirmed sign-ups are deleted after about 30 days. Never sold or shared.

More: all cheapest-way pages · cheapest GPU rental by VRAM · Ask VRAMNeeded · Scan my GPU

Last checked:

$0.06/hrCheapest fit: RTX 3060 · Vast.ai

Check rental →