Can I run Gemma 3 12B on the GeForce RTX 4090?

Runs greatQ4_K_M fits in VRAM with 15.0 GB to spare: Runs great, est. 90.0 tok/s (79.2–100.8, calibrated estimate ±12%).

24 GB VRAM · 1,008.0 GB/s · FP16 82.6 TFLOPS. Assumes 32 GB of DDR5-5600 system RAM, Windows with this GPU driving the display, 8k context and an f16 KV cache. The GeForce RTX 3090 Ti has the same memory setup (24 GB, 1,008.0 GB/s), so its generation-speed estimate is the same; only prompt processing differs. Prompt processing: about 11,564 tok/s (6,938–16,190, rough estimate ±40%) here vs about 5,600 tok/s (3,360–7,840, rough estimate ±40%) on the GeForce RTX 3090 Ti.

Every quant of Gemma 3 12B on the GeForce RTX 4090

4 tracked GGUF files, smallest first, at 8k context
QuantFile sizeVerdictSpeedMemoryRuns asNotes
Q2_K4.77 GBRuns great
est. 133.0 tok/s117.0–148.9calibrated estimate ±12%
6.5 / 24.0 GBFull GPU—
IQ4_XS6.55 GBRuns great
est. 99.6 tok/s87.6–111.5calibrated estimate ±12%
8.3 / 24.0 GBFull GPU—
Q4_K_Mbaseline7.30 GBRuns great
est. 90.0 tok/s79.2–100.8calibrated estimate ±12%
9.0 / 24.0 GBFull GPU—
Q8_012.51 GBRuns great
est. 54.1 tok/s47.6–60.6calibrated estimate ±12%
14.2 / 24.0 GBFull GPU—

Where the memory goes at Q4_K_M

Weights, KV cache and compute buffer are the model; the OS reservation is the display driver.
GPU memory
Weights
7.3 GB
KV cache
0.5 GB
Compute buffer
0.6 GB
OS reserve
0.6 GB
Free
15.0 GB

Context length vs. KV cache

KV cache

Memory needed and verdict at Q4_K_M for each context length and KV cache type, with estimated tokens per second.
ContextKV f16KV q8_0KV q4_0
4k
8.1 GBRuns great
est. 93.2 tok/s82.0–104.4calibrated estimate ±12%
8.0 GBRuns great
est. 94.8 tok/s83.4–106.2calibrated estimate ±12%
7.9 GBRuns great
est. 95.7 tok/s84.2–107.1calibrated estimate ±12%
8k
8.4 GBRuns great
est. 90.0 tok/s79.2–100.8calibrated estimate ±12%
8.2 GBRuns great
est. 93.0 tok/s81.8–104.2calibrated estimate ±12%
8.0 GBRuns great
est. 94.7 tok/s83.3–106.0calibrated estimate ±12%
16k
9.0 GBRuns great
est. 84.3 tok/s74.2–94.4calibrated estimate ±12%
8.5 GBRuns great
est. 89.6 tok/s78.9–100.4calibrated estimate ±12%
8.3 GBRuns great
est. 92.8 tok/s81.6–103.9calibrated estimate ±12%
32k
10.2 GBRuns great
est. 74.7 tok/s65.7–83.6calibrated estimate ±12%
9.2 GBRuns great
est. 83.5 tok/s73.5–93.5calibrated estimate ±12%
8.7 GBRuns great
est. 89.2 tok/s78.5–99.9calibrated estimate ±12%
64k
12.7 GBRuns great
est. 60.9 tok/s53.6–68.2calibrated estimate ±12%
10.7 GBRuns great
est. 73.5 tok/s64.7–82.3calibrated estimate ±12%
9.6 GBRuns great
est. 82.8 tok/s72.8–92.7calibrated estimate ±12%
128k
17.6 GBRuns great
est. 44.4 tok/s39.1–49.7calibrated estimate ±12%
13.6 GBRuns great
est. 59.3 tok/s52.2–66.4calibrated estimate ±12%
11.4 GBRuns great
est. 72.4 tok/s63.7–81.1calibrated estimate ±12%

S = Runs great · A = Runs well · B = Runs slowly · F = Won't run

At Q4_K_M the verdict stays Runs great up to 128k context with an f16 KV cache, and up to 128k with q8_0.

Estimated speed

Generation
est. 90.0 tok/s (79.2–100.8, calibrated estimate ±12%)
Prompt processing
about 11,564 tok/s (6,938–16,190, rough estimate ±40%)

Measured on this exact combination

No public measurement for this exact combination yet; the numbers above are estimates.

If this is not enough

How to run it

Commands for the Q4_K_M file. Both tools download from Hugging Face on first run.

File: google_gemma-3-12b-it-Q4_K_M.gguf (7.30 GB) from bartowski/google_gemma-3-12b-it-GGUF.

llama.cpp
llama-server -hf bartowski/google_gemma-3-12b-it-GGUF:Q4_K_M -c 8192 -ngl all -fa on
  • -ngl all loads every layer on the GPU.
  • -fa on enables flash attention (needed for KV cache quantization).
  • --cache-type-k q8_0 --cache-type-v q8_0 shrinks the KV cache to 0.29 GB at 8k context.
Ollama

PowerShell (quit the Ollama tray app first):

$env:OLLAMA_CONTEXT_LENGTH="8192"; ollama serve
ollama run hf.co/bartowski/google_gemma-3-12b-it-GGUF:Q4_K_M
  • Ollama defaults to 4k context on GPUs under 24 GB. Set OLLAMA_CONTEXT_LENGTH when starting the server, or /set parameter num_ctx inside the chat.
  • /set parameter num_ctx 8192

Related pages

Frequently asked questions

Can I run Gemma 3 12B on the GeForce RTX 4090?

Q4_K_M fits in VRAM with 15.0 GB to spare: Runs great, est. 90.0 tok/s (79.2–100.8, calibrated estimate ±12%). Q4_K_M needs 8.4 GB at 8k context; this setup has 23.4 GB of usable memory and 28.0 GB of free system RAM.

How much context can Gemma 3 12B use on the GeForce RTX 4090?

At Q4_K_M the verdict stays Runs great up to 128k context with an f16 KV cache (8.6 GB of KV) and up to 128k with a q8_0 KV cache (4.6 GB). The model supports up to 128k.

Which quant should I use, and how fast is it?

Q4_K_M (7.30 GB) is the recommended balance: Runs great, est. 90.0 tok/s (79.2–100.8, calibrated estimate ±12%). The largest tracked file that still gets Runs great is Q8_0 (12.51 GB), est. 54.1 tok/s (47.6–60.6, calibrated estimate ±12%).

Speeds are estimates from memory bandwidth, calibrated against public benchmarks, and each one comes with an error band and a confidence label. Real results vary with drivers, backend, context length and thermals.