GPT-OSS 20B
MoEToolsPopularOpenAI · 21B (3.6B active) · Mixture of Experts
OpenAI's open-weight MoE with configurable reasoning
7.3M
4.4K
2025-08
128K tokens
Use cases
Your hardware
16 GB Reference Desktop
Quantization options
What is quantization?| Quant | Bits | VRAM | Disk | Quality | Status |
|---|---|---|---|---|---|
| Q2_K | 2 | 7.2 GB | 6.4 GB | low | Decent · ~28 t/s |
| Q3_K_M | 3 | 9.9 GB | 9 GB | moderate | Tight fit · ~20 t/s |
| Q4_K_M | 4 | 11.3 GB | 10.3 GB | good | Tight fit · ~18 t/s |
| Q5_K_M | 5 | 13.9 GB | 12.8 GB | good | Barely runs · ~15 t/s |
| Q6_K | 6 | 16.6 GB | 15.4 GB | excellent | Too heavy · ~9 t/s |
| Q8_0 | 8 | 22 GB | 20.5 GB | excellent | Barely runs · ~3 t/s |
| F16 | 16 | 43.5 GB | 41.1 GB | lossless | Too heavy · ~1 t/s |
About this model
GPT-OSS 20B (GPT-oss-20b) is a 21B sparse mixture-of-experts (MoE) model activating 3.6B active per token from OpenAI in the GPT-OSS family, designed primarily for chat, reasoning, code workflows. Supports structured tool calling; use Q4_K_M or higher when strict JSON schema adherence matters. Supports up to 128K context tokens; start at 4K–8K with Q8_0 KV cache on tight GPUs.
Hardware planning baselines start at 11.7 GB minimum memory and 19.6 GB recommended memory. At Q4_K_M, weights plus baseline runtime overhead use roughly 11.3 GB of RAM/VRAM and 10.3 GB of disk space. Because MoE routing evaluates only a subset of experts on each generated token, GPT-OSS 20B delivers faster decoding throughput per gigabyte of memory bandwidth than a dense checkpoint of identical total size—provided the full 11.3 GB checkpoint stays resident without SSD paging.
Deploy GPT-OSS 20B locally via Ollama (`gpt-oss:20b`), LM Studio, or Ollama with Flash Attention enabled. Under Apache License 2.0, review official weight cards before commercial redistribution.
Highlights
- Local Fit Baseline11.7 GB minimum and 19.6 GB recommended RAM/VRAM.
- Primary QuantQ4_K_M targets 11.3 GB memory and 10.3 GB disk.
- Context & Capabilities128K max context · Sparse MoE · Tool calling.
System requirements by device
Memory planning targets 11.7 GB minimum RAM/VRAM and 19.6 GB recommended memory. The baseline quant is Q4_K_M, estimated at 11.3 GB memory and 10.3 GB disk. Actual runtime usage shifts with context length, KV cache precision, and OS background overhead.
| Device | Notes |
|---|---|
| Mac (Apple silicon) | Use unified memory headroom (~75% physical RAM max) as the primary fit signal. Start with Q4_K_M and close heavy browser tabs first. |
| Windows / Linux GPU | Keep weights plus KV cache inside dedicated VRAM so Windows WDDM does not spill layers over PCIe into Shared GPU Memory. |
| Phones & Compact Edge Boards | Not practical on phones (11.7 GB min RAM exceeds Android LMK and iOS Jetsam limits). Pick a 2B–4B model on mobile. |
Start with a short session and leave memory for the operating system. A file fitting on disk does not guarantee that it will load in memory.
Estimated memory by quantization
These are rough estimates, not tested minimum requirements. Check the actual file and runtime documentation; context, offloading and operating-system overhead can change the memory needed.
| Quant Tier | Estimated memory | Disk Size | Quality |
|---|---|---|---|
| Q2_K | 7.2 GB | 6.4 GB | low |
| Q3_K_M | 9.9 GB | 9.0 GB | moderate |
| Q4_K_M | 11.3 GB | 10.3 GB | good |
| Q5_K_M | 13.9 GB | 12.8 GB | good |
| Q6_K | 16.6 GB | 15.4 GB | excellent |
| Q8_0 | 22.0 GB | 20.5 GB | excellent |
| F16 | 43.5 GB | 41.1 GB | lossless |
How to run GPT-OSS 20B on your device
Start with a short prompt and the smallest quant that still gives the quality you need. A clean first run is more useful than loading a larger file with no memory headroom.
Run GPT-OSS 20B on Mac
- Install Ollama or LM Studio on macOS Apple Silicon.
- Pull Q4_K_M (11.3 GB) first and confirm it stays below ~75% of your Mac's unified memory.
- Enable Flash Attention and cap initial context at 8K until memory pressure stays below 19.6 GB.
- Consult the Mac guide for Activity Monitor tuning and Metal offload tips.
Run GPT-OSS 20B on Windows
- Install LM Studio for Windows for visual VRAM inspection, or Ollama when you want a localhost API endpoint.
- Load Q4_K_M (~11.3 GB) and verify Dedicated GPU Memory stays within VRAM without spilling into Shared GPU Memory.
- Reserve at least 11.7 GB memory minimum and target 19.6 GB for comfortable context growth.
- Enable Q8_0 KV cache or drop one quant tier if generation slows down over PCIe.
GPT-OSS 20B vs alternatives
| Model | Params | Context | Min RAM | License |
|---|---|---|---|---|
| GPT-OSS 20B | 21B (3.6B active) | 128K | 11.7 GB | Apache 2.0 |
| GPT-OSS 120B | 117B (5.1B active) | 128K | 65.4 GB | Apache 2.0 |
| Qwen Image 2512 | 20B | 4K | 11.2 GB | Apache 2.0 |
| LTX 2.3 | 19B | 4K | 10.6 GB | LTX-2 Community |
| LFM2 24B | 24B (2.3B active) | 32K | 13.4 GB | Liquid AI |
| Devstral Small 2 24B | 24B | 256K | 13.4 GB | Apache 2.0 |
Use this table to choose the smallest nearby model that still matches the job. A related model with lower RAM can be the better local choice when the current page fits only at the edge of available memory.
Frequently asked questions
- What is GPT-OSS 20B?
- GPT-OSS 20B is a 21B sparse mixture-of-experts model (3.6B active active per token) from OpenAI, supporting up to 128K tokens with 11.7 GB minimum RAM and 19.6 GB recommended RAM.
- What is the best way to run GPT-oss-20b locally?
- Choose the smallest quant that matches the task, test one short prompt, then compare RAM, context, and nearby models before making GPT-OSS 20B your default local model.
- How much VRAM or RAM does GPT-OSS 20B require?
- At Q4_K_M, GPT-OSS 20B occupies roughly 11.3 GB of active memory and 10.3 GB on disk. Add 2–6 GB of spare headroom for KV cache buffers, runtime scratch space, and OS apps (19.6 GB recommended).
- What is the best way to run GPT-OSS 20B locally?
- Use `ollama run gpt-oss:20b` for a quick CLI/API setup, or load Q4_K_M in LM Studio or llama.cpp with Flash Attention enabled when you want explicit KV cache and layer control.
- Can GPT-OSS 20B run on Android or iPhone?
- GPT-OSS 20B requires 11.7 GB minimum memory, placing it outside practical 8 GB smartphone limits. Run it on a 16 GB+ Mac or desktop GPU instead, and pick a 2B–4B checkpoint for phones.
- How does GPT-OSS 20B compare to GPT-OSS 120B?
- GPT-OSS 120B (117B, 65.4 GB min RAM) sits closest in size. Compare active parameters, context ceiling (128K vs 128K), and license terms (Apache 2.0) before switching.