How to Deploy gpt-oss 20B Locally
gpt-oss 20B is a small open-weight MoE that OpenAI released in August 2025, and it uses only 3.6B parameters per token. A single 16GB card can run it with the full 128K context, at about 90 to 130 tokens/s. Its expert weights ship in a 4-bit format, so every quant is almost the same size and picking one takes no agonizing; the thing to watch is that it only accepts OpenAI's own harmony chat format.
gpt-oss 20B details
- Min VRAM at 4-bit13 GB · 8K
- Parameters20.9B
- Active params3.6B
- Max context128K
- Architecture
- MoE
- Experts offloaded
- 3 GB VRAM + 11 GB RAM
- License
- Apache-2.0
- Launch date
- Aug 5, 2025
- Vendor
- OpenAI
- Hugging Face repo
- openai/gpt-oss-20b
- GGUF repo
- unsloth/gpt-oss-20b-GGUF
- MLX repo (Apple)
- mlx-community/gpt-oss-20b-MXFP4-Q8
- Ollama tag
- gpt-oss:20b
- Layers
- 24
- Hidden size
- 2,880
- KV heads
- 8
- Head dim
- 64
How much VRAM does gpt-oss 20B need for local deployment?
| Quantization | WeightsGB | 8K contextGB | 32K contextGB | 128K context (max)GB |
|---|---|---|---|---|
| 1-bit | 5.3est. | 6.5 | 7.2 | 9.6 |
| 2-bit | 8.3est. | 9.6 | 10.2 | 12.6 |
| 3-bit | 11.5GGUF | 12.8 | 13.4 | 15.8 |
| 4-bit | 11.6GGUF | 12.9 | 13.5 | 15.9 |
| 5-bit | 11.7GGUF | 13 | 13.6 | 16 |
| 8-bit | 12.1GGUF | 13.4 | 14 | 16.4 |
| BF16/FP16 | 13.8GGUF | 15.1 | 15.7 | 18.1 |
Full calculation rules are on the Methodology page.
Can a single GPU run gpt-oss 20B?
Yes, a single 16GB card holds it entirely, with the full 128K window. Its expert weights ship in a 4-bit format, so every quant lands around 12 GB and the level you pick barely changes memory use. On 16GB or more, just run 8-bit: the RTX 5060 Ti 16GB does about 90 tokens/s and a 24GB RTX 3090 around 130. 12GB is the borderline case: 4-bit with 8K fits with almost nothing to spare, and if you want a longer window, use llama.cpp to move a few layers of experts into system RAM.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 144.4 | 128K | |
| $86958 listings | 109 | 128K | |
| $89518 listings | 144.4 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 147.3 | 128K |
| $1,799107 listings | 146.2 | 128K | |
| $3,75868 listings | 149.5 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 79.8 | 128K |
| $4,89916 listings | 136.8 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 157.9 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 125.6 | 128K |
| $8,24022 listings | 83 | 128K | |
| $8,395123 listings | 171.9 | 128K | |
| $22,50011 listings | 171.9 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 129.2 | 128K | |
| $86958 listings | 92.5 | 128K | |
| $89518 listings | 129.2 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 132.5 | 128K |
| $1,799107 listings | 131.2 | 128K | |
| $3,75868 listings | 134.9 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 65 | 128K |
| $4,89916 listings | 121 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 144.4 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 109.2 | 128K |
| $8,24022 listings | 67.9 | 128K | |
| $8,395123 listings | 160.6 | 128K | |
| $22,50011 listings | 160.6 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $37024 listings | 127.1 | 128K | |
| $86958 listings | 90.4 | 128K | |
| $89518 listings | 127.1 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,25029 listings | 130.4 | 128K |
| $1,799107 listings | 129.2 | 128K | |
| $3,75868 listings | 132.9 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,46420 listings | 63.2 | 128K |
| $4,89916 listings | 118.9 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $7,27412 listings | 142.5 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,54920 listings | 107.1 | 128K |
| $8,24022 listings | 66.1 | 128K | |
| $8,395123 listings | 159 | 128K | |
| $22,50011 listings | 159 | 128K |
Only common GPUs and systems are listed, one set for models under 50B and another for larger ones, sorted by price from low to high.
What PC or server build do you need to run gpt-oss 20B locally?
Detailed calculation rules are on the Methodology page.
As an eBay Partner, VRAMGlass may be compensated if you buy through the eBay links on this page. The price you pay stays the same.
What to know before running gpt-oss 20B locally
Every quant is almost the same size
Its expert weights always stay in a 4-bit format (MXFP4, about 4.25 bits per parameter), so the GGUFs from 3-bit to 8-bit all fall between 11.5 and 12.1 GB, and even the FP16 one is only 13.8 GB. If you have the VRAM, just use 8-bit or FP16. The 1-bit and 2-bit rows in the table (5.3 and 8.3 GB) are estimated from parameter count; no files that small exist, and the speeds in the 2-bit rows of the single-GPU table are estimated from those sizes too. The real 2-bit file is about as big as the 3-bit one; Unsloth says the low quants only compress a few layers such as attention, and results are nearly identical to the original.
It requires the harmony format
OpenAI says it was trained only on the harmony format and won't work properly with other chat formats. Ollama and llama.cpp (with
--jinja, which uses the model's built-in template) apply it automatically; mistakes usually come from building prompts by hand or using a front end that doesn't recognize the template. To hook up tool calling in vLLM, add--tool-call-parser openai--enable-auto-tool-choice.Reasoning effort and sampling parameters
Reasoning effort has three levels, low, medium and high; just write “Reasoning: high” in the system prompt. In llama.cpp you can also set a default by passing
reasoning_effortthrough--chat-template-kwargs. Low answers quickly; high thinks longer and outputs more tokens. OpenAI recommendstemperature1.0 andtop_p1.0.Long context adds almost no VRAM
Half of its 24 layers only look at the most recent 128 tokens, and their cache doesn't grow with context; the native 4K context is extended to 128K with YaRN. So going from 8K to 128K, 4-bit VRAM rises only from 12.9 GB to 15.9 GB.
Launch commands
Ollama
- Windows
- macOS
- Linux
ollama run gpt-oss:20bllama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -c 8192Short on VRAM? Add --cpu-moe to keep the routed experts in system RAM (about 11 GB needed).
llama-server -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M -c 8192 -ngl 99 \ --cpu-moe
vLLM
- Linux
- NVIDIA
- AMD
vllm serve openai/gpt-oss-20bMLX
- Apple Silicon
On a Mac, pip install mlx-lm first; this command downloads the MLX weights from Hugging Face and starts an OpenAI-compatible server.
mlx_lm.server --model mlx-community/gpt-oss-20b-MXFP4-Q8File names follow that week's model-library snapshot; the definitions are in the methodology. Methodology
Other models in the gpt-oss family
| Model | Total params | Active params | 4-bit size |
|---|---|---|---|
| gpt-oss Safeguard 20BMoE | 20.9B | 3.6B | 11.6 GB |
| gpt-oss 120BMoE | 116.8B | 5.1B | 62.8 GB |