How to Deploy gpt-oss Safeguard 20B Locally
gpt-oss Safeguard 20B isn't a chat model; it's a content moderation model that OpenAI fine-tuned from gpt-oss 20B. You write your content policy into the prompt, and it reasons first, then 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; for anything other than safety, OpenAI recommends using gpt-oss directly. Its VRAM needs match gpt-oss 20B: about 13 GB at 4-bit with 8K.
gpt-oss Safeguard 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
- 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 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 Safeguard 20B?
Yes, and moderation doesn't call for a big card: 16GB is plenty and 12GB just barely fits. It's a fine-tune of gpt-oss 20B with identical memory needs, about 13 GB for 4-bit with 8K of context. Moderation prompts tend to be short. OpenAI suggests policies of 400 to 600 tokens, and with the content under review added, 8K is usually enough, so a 12GB card like the RTX 3060 can hold it, with almost no headroom; if the same card also drives your monitor, it may not fit. If your policy runs long, a 16GB card gives room for a bigger window. The RTX 5060 Ti 16GB does about 93 tokens/s, but every verdict starts with a stretch of reasoning, so the higher the reasoning level, the longer each decision takes.
| 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 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 |