Can I run gpt-oss-120b on an RTX 5090?
With --n-cpu-moe 19: the MXFP4 GGUF keeps 30.6 GB on the RTX 5090 and 30.6 GB in system RAM, with the experts of 19 of its 36 layers moved there. Whole, gpt-oss-120b needs about 68.6 GB at MXFP4 with 32K tokens of context, 36.6 GB more than the 32 GB RTX 5090 holds. The smallest setup here that holds gpt-oss-120b at MXFP4 with 32K is A100 80GB.
Why 68.6 GB with vLLM, but 30.6 GB on the RTX 5090 with llama.cpp
The 68.6 GB counts the published checkpoint as vLLM loads it: 60.8 GB of weights, the 32K KV cache, 0.5 GB and 10% overhead. llama.cpp's measured MXFP4 GGUF is 59.0 GB, and its 587 MB of token embeddings stay in RAM. With every layer on the RTX 5090 it takes 60.6 GB at 32K with 1 GB of buffers, 28.6 GB more than it holds, so the experts of 19 layers (30.0 GB) move to system RAM. That leaves 1.42 GB of the 32 GB free, and the PC needs 30.6 GB of free RAM for those experts and the embeddings.
With offload the MXFP4 GGUF with --n-cpu-moe 19 and 32K tokens of context
- On the card
- 30.6 GB
- RTX 5090
- 32 GB, 1,792 GB/s
- In RAM
- 30.6 GB
- Tokens/s
- 22–37 tokens/s
With the MXFP4 GGUF, --n-cpu-moe 19 and 32K tokens of context it writes about 22–37 tokens/s for one request on an RTX 5090 and dual-channel DDR5-5600.
gpt-oss-120b on the RTX 5090 as the context fills
One request, FP16 KV cache, 0.5 GB plus 10% overhead; the MXFP4 GGUF columns are the measured llama.cpp file with every layer on the GPU and 1 GB of buffers; a minus sign is memory missing, and tight is less than 0.5 GB free.
| Context | MXFP4 | Free | Tokens/s | MXFP4 GGUF | Free | Tokens/s |
|---|---|---|---|---|---|---|
| 4K | 67.5 GB | −35.5 GB | — | 59.6 GB | −27.6 GB | — |
| 8K | 67.7 GB | −35.7 GB | — | 59.8 GB | −27.8 GB | — |
| 16K | 68.0 GB | −36.0 GB | — | 60.0 GB | −28.0 GB | — |
| 32K | 68.6 GB | −36.6 GB | — | 60.6 GB | −28.6 GB | — |
| 64K | 69.8 GB | −37.8 GB | — | 61.7 GB | −29.7 GB | — |
| 128K (full) | 72.3 GB | −40.3 GB | — | 64.0 GB | −32.0 GB | — |
--n-cpu-moe for gpt-oss-120b on the RTX 5090
With --n-cpu-moe 19 the MXFP4 GGUF keeps 30.6 GB on the RTX 5090 and 30.6 GB in RAM, about 22–37 tokens/s with DDR5-5600. Measured MXFP4 file, 1 GB of buffers; tokens/s by system RAM speed.
gpt-oss-120b on more than one RTX 5090
| Cards | Best at 32K | Tokens/s | MXFP4 longest | MXFP4 tokens/s | Rent per hour |
|---|---|---|---|---|---|
| 2× (64 GB) | Nothing fits | — | Does not fit | — | $1.38 |
| 4× (128 GB) | MXFP4 | 185–410 | 128K (full) | 185–410 | $2.76 |
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
- Smallest setup for MXFP4 at 32K: A100 80GB.
Run gpt-oss-120b on the RTX 5090 with llama-server
llama-server -hf ggml-org/gpt-oss-120b-GGUF:MXFP4 -c 32768 -ngl 99 --n-cpu-moe 19 -np 1 gpt-oss-120b-MXFP4.gguf, 63.4 GB, from ggml-org/
Questions
Can I run gpt-oss-120b on an RTX 5090?
With --n-cpu-moe 19: the MXFP4 GGUF keeps 30.6 GB on the RTX 5090 and 30.6 GB in system RAM, with the experts of 19 of its 36 layers moved there. Whole, gpt-oss-120b needs about 68.6 GB at MXFP4 with 32K tokens of context, 36.6 GB more than the 32 GB RTX 5090 holds. The smallest setup here that holds gpt-oss-120b at MXFP4 with 32K is A100 80GB.
How fast is gpt-oss-120b on an RTX 5090?
With the MXFP4 GGUF, --n-cpu-moe 19 and 32K tokens of context it writes about 22–37 tokens/s for one request on an RTX 5090 and dual-channel DDR5-5600.
Does gpt-oss-120b need --n-cpu-moe on an RTX 5090?
With --n-cpu-moe 19 the MXFP4 GGUF keeps 30.6 GB on the RTX 5090 and 30.6 GB in RAM, about 22–37 tokens/s with DDR5-5600.
What does a second RTX 5090 change for gpt-oss-120b?
Even two RTX 5090 cards (64 GB) do not hold gpt-oss-120b at 32K.
Try other settings in the VRAM calculator, the speed calculator or the MoE offload planner. See also gpt-oss-120b VRAM requirements, what LLMs an RTX 5090 can run and every pair, or detect your own GPU. Model data checked .