Can I run Gemma 4 12B on an RTX 4070 12GB?
Yes: Gemma 4 12B needs about 8.98 GB at Q4_K_M with 32K tokens of context, which fits the RTX 4070 12GB with 3.02 GB to spare. At 32K the RTX 4070 holds up to Q5_K_M (10.2 GB), and Q4_K_M runs up to 178K tokens.
Yes Q4_K_M with 32K tokens of context
- Q4_K_M, 32K
- 8.98 GB
- RTX 4070
- 12 GB, 504 GB/s
- To spare
- 3.02 GB
- Tokens/s
- 32–45 tokens/s
At Q4_K_M with 32K tokens of context it writes about 32–45 tokens/s for one request on an RTX 4070 12GB.
Best precision for Gemma 4 12B on an RTX 4070 12GB
The most precise setting that leaves at least 0.5 GB free; one that fits with less is marked tight.
| Context | Best fit | Memory | Free | Tokens/s |
|---|---|---|---|---|
| 8K | Q6_K | 11.2 GB | 819 MB | 26–36 |
| 32K | Q5_K_M | 10.2 GB | 1.75 GB | 28–39 |
| 128K | Q4_K_M | 10.6 GB | 1.37 GB | 27–38 |
| 256K (full) | Q3_K_M | 11.4 GB | 610 MB | 25–35 |
Gemma 4 12B on the RTX 4070 as the context fills
One request, FP16 KV cache, 0.5 GB plus 10% overhead; a minus sign is memory missing, and tight is less than 0.5 GB free.
| Context | Q4_K_M | Free | Tokens/s | Q8_0 | Free | Tokens/s |
|---|---|---|---|---|---|---|
| 4K | 8.50 GB | 3.50 GB | 34–47 | 14.1 GB | −2.10 GB | — |
| 8K | 8.57 GB | 3.43 GB | 33–47 | 14.2 GB | −2.17 GB | — |
| 16K | 8.70 GB | 3.30 GB | 33–46 | 14.3 GB | −2.31 GB | — |
| 32K | 8.98 GB | 3.02 GB | 32–45 | 14.6 GB | −2.58 GB | — |
| 64K | 9.53 GB | 2.47 GB | 30–42 | 15.1 GB | −3.13 GB | — |
| 128K | 10.6 GB | 1.37 GB | 27–38 | 16.2 GB | −4.23 GB | — |
| 256K (full) | 12.8 GB | −848 MB | — | 18.4 GB | −6.43 GB | — |
Gemma 4 12B on more than one RTX 4070
| Cards | Best at 32K | Tokens/s | Q4_K_M longest | Q4_K_M tokens/s |
|---|---|---|---|---|
| 2× (24 GB) | Q8_0 | 35–51 | 256K (full) | 54–82 |
| 4× (48 GB) | BF16 | 38–56 | 256K (full) | 91–148 |
Tensor parallel with the combined bandwidth, as in vLLM; llama.cpp splits layers by default and runs at about one card's speed.
Other options
- The next smaller setting, Q3_K_M, takes 7.55 GB at 32K, 4.45 GB under the RTX 4070; it fits with 0.5 GB to spare up to 256K (full) tokens.
- Smallest setup for Q4_K_M at 32K: RTX 3060 12GB.
Run Gemma 4 12B on the RTX 4070 with llama-server
llama-server -hf unsloth/gemma-4-12b-it-GGUF:Q4_K_M -c 182272 -np 1 gemma-4-12b-it-Q4_K_M.gguf, 7.1 GB, from unsloth/
Questions
Can I run Gemma 4 12B on an RTX 4070 12GB?
Yes: Gemma 4 12B needs about 8.98 GB at Q4_K_M with 32K tokens of context, which fits the RTX 4070 12GB with 3.02 GB to spare. At 32K the RTX 4070 holds up to Q5_K_M (10.2 GB), and Q4_K_M runs up to 178K tokens.
How fast is Gemma 4 12B on an RTX 4070 12GB?
At Q4_K_M with 32K tokens of context it writes about 32–45 tokens/s for one request on an RTX 4070 12GB.
What does a second RTX 4070 12GB change for Gemma 4 12B?
Two RTX 4070 12GB cards (24 GB in one tensor-parallel group) hold Gemma 4 12B at Q8_0 with 32K, and Q4_K_M up to 256K (full) tokens, at about 54–82 tokens/s.
Try other settings in the VRAM calculator or the speed calculator. See also Gemma 4 12B VRAM requirements, what LLMs an RTX 4070 12GB can run and every pair, or detect your own GPU. Model data checked .