Can I run Gemma 4 26B-A4B on the GeForce RTX 4070?
Runs wellQ4_K_M keeps attention and the experts of 15 layers on the GPU (11.1 GB) and the remaining experts in 7.2 GB of system RAM: Runs well, est. 47.8 tok/s (33.5–62.1, theoretical estimate ±30%). UD-Q2_K_XL (heavy quality loss) would reach Runs great, est. 111.5 tok/s (89.2–133.7, calibrated estimate ±20%).
12 GB VRAM · 504.0 GB/s · FP16 29.1 TFLOPS. Assumes 32 GB of DDR5-5600 system RAM, Windows with this GPU driving the display, 8k context and an f16 KV cache. The verdict and quant file above stay the same anywhere from 16 to 128 GB of system RAM. The GeForce RTX 4070 Super has the same memory setup (12 GB, 504.0 GB/s), so its generation-speed estimate is the same; only prompt processing differs.
Every quant of Gemma 4 26B-A4B on the GeForce RTX 4070
| Quant | File size | Verdict | Speed | Memory | Runs as | Notes |
|---|---|---|---|---|---|---|
| UD-Q2_K_XL | 10.55 GB | Runs great | est. 111.5 tok/s89.2–133.7calibrated estimate ±20% | 11.9 / 12.0 GB | Full GPU | — |
| IQ4_XS | 13.60 GB | Runs well | est. 64.1 tok/s44.9–83.3theoretical estimate ±30% | 11.6 / 12.0 GB + 3.3 GB RAM | MoE experts in RAM | Not fully on the GPU — Runs great needs the whole model in GPU memory |
| Q4_K_Mbaseline | 16.95 GB | Runs well | est. 47.8 tok/s33.5–62.1theoretical estimate ±30% | 11.1 / 12.0 GB + 7.2 GB RAM | MoE experts in RAM | Not fully on the GPU — Runs great needs the whole model in GPU memory |
| Q8_0 | 26.86 GB | Runs slowly | est. 28.1 tok/s19.7–36.5theoretical estimate ±30% | 10.4 / 12.0 GB + 17.8 GB RAM | MoE experts in RAM | Experts run from system RAM — Runs well needs 30 tok/s or more on this path |
Models with a thinking mode spend extra tokens thinking, so their speed thresholds are 1.5× stricter (30 / 12 / 3 tok/s). With thinking turned off, a model may do one grade better.
Where the memory goes at Q4_K_M
- Weights
- 9.8 GB
- KV cache
- 0.2 GB
- Compute buffer
- 0.6 GB
- OS reserve
- 0.6 GB
- Free
- 0.9 GB
- Weights in system RAM
- 7.2 GB
Context length vs. KV cache
| Context | KV f16 | KV q8_0 | KV q4_0 |
|---|---|---|---|
| 4k | 17.6 GBRuns well est. 49.8 tok/s34.8–64.7theoretical estimate ±30% | 17.5 GBRuns well est. 50.0 tok/s35.0–65.0theoretical estimate ±30% | 17.5 GBRuns well est. 50.2 tok/s35.1–65.2theoretical estimate ±30% |
| 8k | 17.7 GBRuns well est. 47.8 tok/s33.5–62.1theoretical estimate ±30% | 17.6 GBRuns well est. 49.7 tok/s34.8–64.6theoretical estimate ±30% | 17.6 GBRuns well est. 50.0 tok/s35.0–65.0theoretical estimate ±30% |
| 16k | 17.9 GBRuns well est. 46.7 tok/s32.7–60.8theoretical estimate ±30% | 17.8 GBRuns well est. 47.7 tok/s33.4–62.1theoretical estimate ±30% | 17.7 GBRuns well est. 48.3 tok/s33.8–62.8theoretical estimate ±30% |
| 32k | 18.4 GBRuns well est. 43.6 tok/s30.5–56.7theoretical estimate ±30% | 18.1 GBRuns well est. 46.6 tok/s32.6–60.6theoretical estimate ±30% | 17.9 GBRuns well est. 47.7 tok/s33.4–62.0theoretical estimate ±30% |
| 64k | 19.4 GBRuns well est. 38.5 tok/s26.9–50.0theoretical estimate ±30% | 18.7 GBRuns well est. 42.3 tok/s29.6–55.0theoretical estimate ±30% | 18.4 GBRuns well est. 45.2 tok/s31.7–58.8theoretical estimate ±30% |
| 128k | 21.3 GBRuns well est. 31.1 tok/s21.8–40.5theoretical estimate ±30% | 20.1 GBRuns well est. 36.5 tok/s25.5–47.4theoretical estimate ±30% | 19.4 GBRuns well est. 41.1 tok/s28.7–53.4theoretical estimate ±30% |
| 256k | 25.2 GBRuns slowly est. 22.5 tok/s15.8–29.3theoretical estimate ±30% | 22.7 GBRuns slowly est. 29.1 tok/s20.3–37.8theoretical estimate ±30% | 21.4 GBRuns well est. 34.7 tok/s24.3–45.1theoretical estimate ±30% |
S = Runs great · A = Runs well · B = Runs slowly · F = Won't run
At Q4_K_M the verdict stays Runs well up to 128k context with an f16 KV cache, and up to 128k with q8_0.
Estimated speed
- Generation
- est. 47.8 tok/s (33.5–62.1, theoretical estimate ±30%)
- Prompt processing
- Prompt-processing estimates only apply when the whole model runs on the GPU.
Why this verdict: Not fully on the GPU — Runs great needs the whole model in GPU memory
Measured on this exact combination
No public measurement for this exact combination yet; the numbers above are estimates.
If this is not enough
A larger model that also runs well on the GeForce RTX 4070
Runs wellQwen3.5 35B-A3B: Runs well, est. 57.1 tok/s (40.0–74.3, theoretical estimate ±30%)
A lower quant of Gemma 4 26B-A4B
Runs greatUD-Q2_K_XL (10.55 GB, heavy quality loss): Runs great, est. 111.5 tok/s (89.2–133.7, calibrated estimate ±20%)
Keep only the experts in system RAM
--n-cpu-moe 15 keeps only the experts of the first 15 layers in system RAM and everything else on the GPU (this estimate).
How to run it
Commands for the UD-Q4_K_M file. Both tools download from Hugging Face on first run.
File: gemma-4-26B-A4B-it-UD-Q4_K_M.gguf (16.95 GB) from unsloth/gemma-4-26B-A4B-it-GGUF.
llama-server -hf unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M -c 8192 -ngl all --n-cpu-moe 15 -fa on- -ngl all loads every layer on the GPU.
- --n-cpu-moe 15 keeps the experts in the first 15 layers in system RAM; the remaining 15 layers with experts keep them on the GPU. This estimate assumes the same split.
- If loading fails with an out-of-memory error, raise the value to 16, or to 17 if that isn't enough.
- llama.cpp b7410 (December 2025) and later split the model in a similar way on their own if you leave out -ngl and --n-cpu-moe.
- -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.09 GB at 8k context.
PowerShell (quit the Ollama tray app first):
$env:OLLAMA_CONTEXT_LENGTH="8192"; ollama serve
ollama run hf.co/unsloth/gemma-4-26B-A4B-it-GGUF:UD-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.
- Ollama 0.30 and later automatically keep part of the experts in system RAM to fit your VRAM. Older versions split whole layers instead, which is much slower.
/set parameter num_ctx 8192
Related pages
Guide: How much VRAM do local LLMs need? GPU requirements for 8–32 GB (2026)
Other models on the GeForce RTX 4070
Gemma 4 26B-A4B on other hardware
Frequently asked questions
Can I run Gemma 4 26B-A4B on the GeForce RTX 4070?
Q4_K_M keeps attention and the experts of 15 layers on the GPU (11.1 GB) and the remaining experts in 7.2 GB of system RAM: Runs well, est. 47.8 tok/s (33.5–62.1, theoretical estimate ±30%). UD-Q2_K_XL (heavy quality loss) would reach Runs great, est. 111.5 tok/s (89.2–133.7, calibrated estimate ±20%). Q4_K_M needs 17.7 GB at 8k context; this setup has 11.4 GB of usable memory and 28.0 GB of free system RAM.
How much context can Gemma 4 26B-A4B use on the GeForce RTX 4070?
At Q4_K_M the verdict stays Runs well up to 128k context with an f16 KV cache (2.7 GB of KV) and up to 128k with a q8_0 KV cache (1.4 GB). The model supports up to 256k.
Which quant should I use, and how fast is it?
Q4_K_M (16.95 GB) is the recommended balance: Runs well, est. 47.8 tok/s (33.5–62.1, theoretical estimate ±30%). It is also the largest tracked file that gets this verdict.
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.