Can I run gpt-oss-20b on the GeForce RTX 4070?
Runs wellMXFP4 keeps attention and the experts of 20 layers on the GPU (11.2 GB) and the remaining experts in 2.3 GB of system RAM: Runs well, est. 78.5 tok/s (55.0–102.1, theoretical estimate ±30%).
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 gpt-oss-20b on the GeForce RTX 4070
| Quant | File size | Verdict | Speed | Memory | Runs as | Notes |
|---|---|---|---|---|---|---|
| MXFP4baseline | 12.11 GB | Runs well | est. 78.5 tok/s55.0–102.1theoretical estimate ±30% | 11.2 / 12.0 GB + 2.3 GB RAM | MoE experts in RAM | Not fully on the GPU — Runs great needs the whole model in GPU memory |
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 MXFP4
- Weights
- 9.8 GB
- KV cache
- 0.2 GB
- Compute buffer
- 0.6 GB
- OS reserve
- 0.6 GB
- Free
- 0.8 GB
- Weights in system RAM
- 2.3 GB
Context length vs. KV cache
| Context | KV f16 | KV q8_0 | KV q4_0 |
|---|---|---|---|
| 4k | 12.1 GBRuns well est. 87.6 tok/s61.3–113.9theoretical estimate ±30% | 12.1 GBRuns well est. 88.6 tok/s62.0–115.2theoretical estimate ±30% | 12.0 GBRuns well est. 89.2 tok/s62.4–115.9theoretical estimate ±30% |
| 8k | 12.3 GBRuns well est. 78.5 tok/s55.0–102.1theoretical estimate ±30% | 12.2 GBRuns well est. 87.4 tok/s61.2–113.7theoretical estimate ±30% | 12.1 GBRuns well est. 88.5 tok/s62.0–115.1theoretical estimate ±30% |
| 16k | 12.5 GBRuns well est. 75.2 tok/s52.6–97.7theoretical estimate ±30% | 12.3 GBRuns well est. 78.3 tok/s54.8–101.8theoretical estimate ±30% | 12.2 GBRuns well est. 87.3 tok/s61.1–113.5theoretical estimate ±30% |
| 32k | 13.1 GBRuns well est. 64.6 tok/s45.2–84.0theoretical estimate ±30% | 12.7 GBRuns well est. 69.4 tok/s48.5–90.2theoretical estimate ±30% | 12.5 GBRuns well est. 78.0 tok/s54.6–101.4theoretical estimate ±30% |
| 64k | 14.2 GBRuns well est. 47.9 tok/s33.6–62.3theoretical estimate ±30% | 13.4 GBRuns well est. 60.0 tok/s42.0–78.0theoretical estimate ±30% | 13.0 GBRuns well est. 69.0 tok/s48.3–89.7theoretical estimate ±30% |
| 128k | 16.4 GBRuns well est. 32.7 tok/s22.9–42.5theoretical estimate ±30% | 14.9 GBRuns well est. 43.0 tok/s30.1–55.9theoretical estimate ±30% | 14.1 GBRuns well est. 52.9 tok/s37.0–68.8theoretical estimate ±30% |
S = Runs great · A = Runs well · B = Runs slowly · F = Won't run
At MXFP4 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. 78.5 tok/s (55.0–102.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%)
Keep only the experts in system RAM
--n-cpu-moe 4 keeps only the experts of the first 4 layers in system RAM and everything else on the GPU (this estimate).
How to run it
Commands for the MXFP4 file. Both tools download from Hugging Face on first run.
File: gpt-oss-20b-MXFP4.gguf (12.11 GB) from ggml-org/gpt-oss-20b-GGUF.
llama-server -hf ggml-org/gpt-oss-20b-GGUF:MXFP4 -c 8192 -ngl all --n-cpu-moe 4 -fa on- -ngl all loads every layer on the GPU.
- --n-cpu-moe 4 keeps the experts in the first 4 layers in system RAM; the remaining 20 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 5, or to 6 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.11 GB at 8k context.
PowerShell (quit the Ollama tray app first):
$env:OLLAMA_CONTEXT_LENGTH="8192"; ollama serve
ollama run hf.co/ggml-org/gpt-oss-20b-GGUF:MXFP4- 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
gpt-oss-20b on other hardware
Frequently asked questions
Can I run gpt-oss-20b on the GeForce RTX 4070?
MXFP4 keeps attention and the experts of 20 layers on the GPU (11.2 GB) and the remaining experts in 2.3 GB of system RAM: Runs well, est. 78.5 tok/s (55.0–102.1, theoretical estimate ±30%). MXFP4 needs 12.3 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 gpt-oss-20b use on the GeForce RTX 4070?
At MXFP4 the verdict stays Runs well up to 128k context with an f16 KV cache (3.2 GB of KV) and up to 128k with a q8_0 KV cache (1.7 GB). The model supports up to 128k.
Which quant should I use, and how fast is it?
MXFP4 (12.11 GB) is the only tracked file: Runs well, est. 78.5 tok/s (55.0–102.1, theoretical estimate ±30%).
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.