NVIDIA Nemotron™ is a family of open models with open weights, training data, and recipes, delivering leading efficiency and accuracy for building specialized AI agents.
gpt-oss-20b
openai·Instruct·released 4 Aug 2025
ollama run gpt-oss:20bgpt-oss-20b is an open-weight chat and text generation model from OpenAI, part of the GPT OSS family. It has 20.9B parameters, of which 4.2B are active, and uses a mixture-of-experts design. It accepts text input and produces text output, with a context length of 131,072 tokens. It is released under the Apache 2.0 licence, which permits commercial use. The other size in the family is gpt-oss-120b.
How much VRAM does gpt-oss-20b need?
At Q4_K_M gpt-oss-20b needs about 13 GB with an 8K context (13 GB at Q4, 42 GB at full precision). Pick your GPU to see what fits and how fast it runs.
Needs: ≈12 GB · Q4_K_M · 8K context — Pick a GPU to check the fit.
Advanced: context 8K · KV cache 16-bit
Smallest GPU for each quant and context (KV cache 16-bit)
| Quantisation | 4K | 8K | 16K | 32K | 64K | 128K |
|---|---|---|---|---|---|---|
| Q3_K_M | ||||||
| Q4_K_M | ||||||
| Q5_K_M | ||||||
| Q6_K | ||||||
| Q8_0 | ||||||
| FP16 |
≤16 GB card24–32 GB48–96 GBmore
| Quantisation | Total |
|---|---|
| Q2_KHeavy lossSmallest, noticeably worse quality | ≈12 GB |
| Q3_K_MNoticeable lossSmall, some quality loss | ≈12 GB |
| Q4_K_MrecommendedSmall lossRecommended default for local use | ≈12 GB |
| Q5_K_MNear-losslessNear-lossless for most tasks | ≈12 GB |
| Q6_KNear-losslessPractically lossless | ≈13 GB |
| Q8_0LosslessLossless in practice, twice the size of Q4 | ≈13 GB |
| FP16 / BF16LosslessFull precision, as released | ≈14 GB |
Estimates for 8K tokens of context: weights + KV cache + runtime overhead. All experts stay in memory, but only the active ones are read per token. Speed assumes memory-bound decoding at your GPU’s bandwidth. Pick a GPU above and the fit column checks every row against it. Weights marked “file” use the real GGUF download size; “est.” rows are computed from the parameter count.
How to pick a quant
Take the biggest quant that fits with room left for context. Q4_K_M is the usual sweet spot. Below Q4 quality drops fast, above Q6 you mostly pay memory for nothing. Big models (70B+, large MoE) tolerate low quants better than small ones.
- LosslessF16, Q8_0
- Near-losslessQ6_K, Q5_K_M
- Small lossQ5_K_S, Q4_K_M, IQ4_NL, IQ4_XS, Q4_K_S
- Noticeable lossQ4_0, Q3_K_L, Q3_K_M, IQ3_M
- Heavy lossIQ3_XXS, Q3_K_S, IQ2_M, Q2_K
Typical quality loss, not measured per model. Tiers come from KL divergence against FP16 on Llama 3 8B: llama.cpp perplexity README: LLaMA 3 8B scoreboard (KLD and ΔPPL vs FP16, Wikitext-2); llama.cpp quantize tool: ΔPPL per quant type @ Llama-3-8B
How much context fits?
At 8K context, Q4_K_M needs ≈12 GB(11 GB weights + 0.4 GB KV cache + 1.0 GB overhead). Pick a GPU above to see how much context fits.
Weights + overheadKV cache
Can the Tesla T4 run gpt-oss-20b? →
Speed vs quality per quant
Smaller quants run faster and fit in less memory, but lose quality.
Fits in VRAMTight fitCPU offload✕ won't runQuality is typical KL divergence vs FP16, not measured for this model.
Real-world speed of gpt-oss-20b
Tokens per second measured by people running it at home. A GPU shows a median once 3 reports agree on the same setup. Reports far from our estimate wait for a review. Measure yours with llama-bench →
No medians yet. Be one of the first 3 to report a setup.
All reports
Run gpt-oss-20b locally
--quantQ4_K_Mdefault; pick your GPU to tailor itunsloth/gpt-oss-20b-GGUF
ollama run gpt-oss:20bThe library build picks its own default quantisation.
ollama run hf.co/unsloth/gpt-oss-20b-GGUF:Q4_K_M llama-server -hf unsloth/gpt-oss-20b-GGUF:Q4_K_MDownloads the GGUF on first run. Installed through llama.app? The same flags work with `llama serve`.
lms get unsloth/gpt-oss-20b-GGUF@Q4_K_MThen load it from the LM Studio app or with `lms load`.
pip install mlx-lm
mlx_lm.generate --model lmstudio-community/gpt-oss-20b-MLX-8bit --prompt "Hello"Use `mlx_lm.chat` with the same --model for an interactive chat.
mlx_lm.server --model lmstudio-community/gpt-oss-20b-MLX-8bit --port 8080API on http://localhost:8080/v1.
vllm serve openai/gpt-oss-20b vllm serve amd/gpt-oss-20b-WFP8-AFP8-KVFP8services:
vllm:
image: vllm/vllm-openai:latest
command: openai/gpt-oss-20b
ports:
- "8000:8000"
ipc: host
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]API on port 8000.
sglang serve openai/gpt-oss-20b --host 0.0.0.0 --port 30000services:
sglang:
image: lmsysorg/sglang:latest
command: sglang serve openai/gpt-oss-20b --host 0.0.0.0 --port 30000
ports:
- "30000:30000"
ipc: host
volumes:
- ~/.cache/huggingface:/root/.cache/huggingface
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]API on port 30000.
from transformers import pipeline
pipe = pipeline("text-generation", model="openai/gpt-oss-20b", dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Explain self-hosting in one paragraph."}]
out = pipe(messages, max_new_tokens=512)
print(out[0]["generated_text"][-1]["content"])Benchmarks
| Benchmark | Score | Source |
|---|---|---|
| MMLU-Pro | 73.6% | independent |
| GPQA Diamond | 58.6% | independent |
| Humanity's Last Exam | 8.8% | self-reported |
| SWE-bench Verified | 53.2% | self-reported |
| LMArena Text | 1287 | independent |
Self-reported scores come from the model card and are not independently verified. Rank is among all models with a score on that benchmark.
Quantised versions and downloads
| Repository | Format | Quant | Size |
|---|---|---|---|
| unsloth/gpt-oss-20b-unsloth-bnb-4bit | Safetensors | BNB-4BIT | — |
| unsloth/gpt-oss-20b-bnb-4bit | Safetensors | BNB-4BIT | — |
| amd/gpt-oss-20b-WFP8-AFP8-KVFP8 | Safetensors | FP8 | — |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q3_K_S | 11 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q2_K | 11 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q3_K_M | 12 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q4_0 | 12 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q4_1 | 12 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q4_K_S | 12 GB |
| unsloth/gpt-oss-20b-GGUF | GGUF | Q4_K_M | 12 GB |
About gpt-oss-20b
Welcome to the gpt-oss series, OpenAI’s open-weight models designed for powerful reasoning, agentic tasks, and versatile developer use cases. We’re releasing two flavors of these open models: - gpt-oss-120b — for production, general purpose, high reasoning use cases that fit into a single 80GB GPU (like NVIDIA H100 or AMD MI300X) (117B parameters with 5.1B active parameters) - gpt-oss-20b — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters) Both models were trained on our harmony response format and should only be used with the harmony format as it will not work correctly otherwise.
Full model card on Hugging Face →Other GPT OSS models
Whole family →Alternatives to gpt-oss-20b
All alternatives →LFM2.5-24B-A2B is a 24B-parameter reasoning model with only 2B active parameters, built for fast, private agents on-device. It is the largest and final model in the LFM2.5 family, which now spans two orders of magnitude: from LFM2.5-230M to LFM2.5-24B-A2B.
Versioning notice: This card describes the current OTel 2.0 OSFT checkpoint. The model weights may be updated over time. For reproducible evaluation or production deployment, pin a specific model revision, checkpoint hash, or release tag rather than relying on the floating latest version.
Qwen3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models.
Aloha! 🌺 Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding.
Laguna XS 2.1 is a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token designed for agentic coding and long-horizon work on a local machine.
gpt-oss-20b FAQ
- How much VRAM does gpt-oss-20b need?
- About 13 GB at Q4_K_M with an 8K context. Q8_0 needs about 23 GB and full precision about 42 GB. Longer contexts need more memory for the KV cache.
- Can gpt-oss-20b run on the Tesla T4?
- Yes. It fits at FP16 / BF16 (about 14 GB), at an estimated 21 tokens/s. It fits comfortably on the Arc A770 16GB, Radeon RX 7800 XT, Tesla P40.
- Can I use gpt-oss-20b commercially?
- Yes. It is released under Apache 2.0. Permissive: use, modify and sell freely; keep the notice and licence text.
- What is the context length of gpt-oss-20b?
- 131,072 tokens (128K). The full window needs far more memory than an 8K context.
- How do I run gpt-oss-20b with Ollama or llama.cpp?
- With Ollama: ollama run gpt-oss:20b. With llama.cpp: llama-server -hf unsloth/gpt-oss-20b-GGUF:Q4_K_M, which starts an OpenAI-compatible server.
Rate this model
Data from Hugging Face, the model card and public leaderboards. Memory and speed figures are estimates; real numbers depend on the runtime, context length and drivers. Always check the licence yourself before commercial use.
0 comments