Run gpt-oss Safeguard 20B Locally: VRAM & GPU Requirements
gpt-oss Safeguard 20B, a content moderation model OpenAI fine-tuned from gpt-oss 20B, needs about 13 GB of VRAM at 4-bit with 8K context. A single GPU can run it locally. Rather than acting as a chat model, it reads your content policy from the prompt, reasons first, and judges whether a piece of content violates it. That makes it a fit for filtering an LLM's inputs and outputs and for labeling content, while OpenAI recommends using gpt-oss directly for anything other than safety.
gpt-oss Safeguard 20B details
- Min VRAM at 4-bit (8K context)13 GB
- Parameters20.9B
- Active params3.6B
- Max context128K
- Architecture
- MoE
- Experts offloaded
- 3 GB VRAM + 11 GB RAM
- License
- Apache-2.0
- Launch date
- Oct 29, 2025
- Vendor
- OpenAI
- Hugging Face repo
- openai/gpt-oss-safeguard-20b
- GGUF repo
- unsloth/gpt-oss-safeguard-20b-GGUF
- MLX repo (Apple)
- lmstudio-community/gpt-oss-safeguard-20b-MLX-MXFP4
- Ollama tag
- gpt-oss-safeguard:20b
- Layers
- 24
- Hidden size
- 2,880
- KV heads
- 8
- Head dim
- 64
How much VRAM does gpt-oss Safeguard 20B need?
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| 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 Safeguard 20B?
Yes, a 16GB GPU runs gpt-oss Safeguard 20B with room to spare, and a 12GB card just barely fits it. As a fine-tune of gpt-oss 20B, it has identical VRAM needs at about 13 GB for 4-bit with 8K of context. OpenAI suggests policies of 400 to 600 tokens, so 8K usually covers the policy plus the content under review. A 12GB card like the RTX 3060 can hold it with almost no headroom, and it may not fit if the same card also drives your monitor. If your policy runs long, a 16GB GPU gives room for a bigger window. The RTX 5060 Ti 16GB does about 93 tokens/s, but every verdict starts with reasoning, so higher reasoning levels make each decision take longer.
The table below assumes all experts stay in VRAM with no RAM offloading. If you are short on VRAM, you can offload experts to RAM; see the complete builds below.
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 144.4 | 128K | |
| $88045 listings | 109 | 128K | |
| $1,37813 listings | 144.4 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 147.3 | 128K |
| $1,992116 listings | 146.2 | 128K | |
| $3,82574 listings | 149.5 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 79.8 | 128K |
| $4,89925 listings | 136.8 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 157.9 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 125.6 | 128K |
| $7,385128 listings | 171.9 | 128K | |
| $7,90037 listings | 83 | 128K | |
| $18,60020 listings | 171.9 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 129.2 | 128K | |
| $88045 listings | 92.5 | 128K | |
| $1,37813 listings | 129.2 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 132.5 | 128K |
| $1,992116 listings | 131.2 | 128K | |
| $3,82574 listings | 134.9 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 65 | 128K |
| $4,89925 listings | 121 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 144.4 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 109.2 | 128K |
| $7,385128 listings | 160.6 | 128K | |
| $7,90037 listings | 67.9 | 128K | |
| $18,60020 listings | 160.6 | 128K |
| Device | Price | Speed t/s | Max context |
|---|---|---|---|
| $41316 listings | 127.1 | 128K | |
| $88045 listings | 90.4 | 128K | |
| $1,37813 listings | 127.1 | 128K | |
| Radeon RX 7900 XTX24 GB | $1,40027 listings | 130.4 | 128K |
| $1,992116 listings | 129.2 | 128K | |
| $3,82574 listings | 132.9 | 128K | |
| Ryzen AI Max+ 395 128GBWhole system · 128 GB | $4,02531 listings | 63.2 | 128K |
| $4,89925 listings | 118.9 | 128K | |
| Mac Studio M5 Ultra 96GBWhole system · 96 GB | $6,7995 listings | 142.5 | 128K |
| MacBook Pro M5 Max 128GBWhole system · 128 GB | $7,00029 listings | 107.1 | 128K |
| $7,385128 listings | 159 | 128K | |
| $7,90037 listings | 66.1 | 128K | |
| $18,60020 listings | 159 | 128K |
Only common GPUs and systems are listed, from cheapest to most expensive.
What PC or server build do you need to run gpt-oss Safeguard 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 Safeguard 20B locally
Put the policy in the system prompt
Put the policy in the system message and include Reasoning: low, medium or high in it; if you leave it out, the default is medium. OpenAI's guide says policies of 400 to 600 tokens work best, and even ones as long as about 10,000 tokens still give reasonable results.
Make the output machine-readable
You can have it reply with a single character, 0 or 1, or ask for JSON that includes whether the content violates the policy, the violation category, the matching clause, a confidence score and the reasoning. For an automated moderation pipeline, 0/1 or JSON with fixed fields is the easiest to work with.
When not to use it
OpenAI's guide states that if you have a few thousand labeled examples, training a traditional classifier gives lower latency, uses less compute and may well perform better. This model suits cases where the policy changes often and there's no time to build up labeled data: changing the policy only means changing the prompt, with no retraining.
Deployment
It also uses the harmony chat format. Ollama's official library has gpt-oss-safeguard:20b, vLLM runs it with vllm serve openai/gpt-oss-safeguard-20b, and for llama.cpp there are GGUFs packaged by Unsloth. Its reasoning output is meant for developers and moderators, and OpenAI advises against showing it to ordinary users.
Launch commands
Ollama
- Windows
- macOS
- Linux
ollama run gpt-oss-safeguard:20bllama.cpp
- NVIDIA
- AMD
- Mac
- CPU
llama-server -hf unsloth/gpt-oss-safeguard-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-safeguard-20b-GGUF:Q4_K_M -c 8192 \ -ngl 99 --cpu-moe
vLLM
- Linux
- NVIDIA
- AMD
vllm serve openai/gpt-oss-safeguard-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 lmstudio-community/gpt-oss-safeguard-20b-MLX-MXFP4File 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 20BMoE | 20.9B | 3.6B | 11.6 GB |
| gpt-oss 120BMoE | 116.8B | 5.1B | 62.8 GB |