VRAM · Local model
gpt-oss 20B VRAM requirements: can you run it locally?
Yes, on one 16 GB GPU such as the GeForce RTX 5080, or a Mac with 24 GB of unified memory. With its official MXFP4 file and an 8K context it needs about 13 GB. That covers 11 GB of weights, the KV cache and runtime overhead. Estimates from the model’s official config.json, checked 2026-10-08.
- Parameters
- 20.9B
- Layers
- 24
- Max context
- 131,072
- Experts
- 32 (4 active)
Attention: 12 full-attention layers, 12 sliding-window layers (last 128 tokens).
Requirements
How much VRAM does gpt-oss 20B need?
| Quantisation | 8K context | 32K context | 128K context |
|---|---|---|---|
| MXFP4 (official file) | 13 GB | 13 GB | 16 GB |
gpt-oss 20B is released in MXFP4 and local builds stay about that size, so these use the official file. Weights + FP16 KV cache + overhead, batch 1; the VRAM calculator shows the formula.
GPUs
Which GPUs can run gpt-oss 20B?
| Memory | Example card | Best quality at 8K | Longest context at that quality | Longest context (official file) |
|---|---|---|---|---|
| 8 GB | GeForce RTX 4060 | Doesn’t fit | — | — |
| 12 GB | GeForce RTX 5070 | Doesn’t fit | — | — |
| 16 GB | GeForce RTX 5080 | MXFP4 (official file) · 13 GB | 128K | 128K |
| 24 GB | Radeon RX 7900 XTX | MXFP4 (official file) · 13 GB | 128K | 128K |
| 32 GB | GeForce RTX 5090 | MXFP4 (official file) · 13 GB | 128K | 128K |
| 48 GB | L40S | MXFP4 (official file) · 13 GB | 128K | 128K |
| 80 GB | H100 80GB | MXFP4 (official file) · 13 GB | 128K | 128K |
| 96 GB | RTX PRO 6000 Blackwell | MXFP4 (official file) · 13 GB | 128K | 128K |
The smallest card that holds gpt-oss 20B with its official MXFP4 file with an 8K context has 16 GB, such as the GeForce RTX 5080; there it has room for about 128K tokens. Cards with 8 and 12 GB can’t hold the official file with an 8K context.
Apple Silicon
Can you run gpt-oss 20B on a Mac?
| Mac memory | GPU can use | Best quality at 8K | Longest context |
|---|---|---|---|
| 16 GB | 11 GB | Doesn’t fit | — |
| 24 GB | 16 GB | MXFP4 (official file) · 13 GB | 128K |
| 32 GB | 21 GB | MXFP4 (official file) · 13 GB | 128K |
| 36 GB | 27 GB | MXFP4 (official file) · 13 GB | 128K |
| 48 GB | 36 GB | MXFP4 (official file) · 13 GB | 128K |
| 64 GB | 48 GB | MXFP4 (official file) · 13 GB | 128K |
| 96 GB | 72 GB | MXFP4 (official file) · 13 GB | 128K |
| 128 GB | 96 GB | MXFP4 (official file) · 13 GB | 128K |
| 192 GB | 144 GB | MXFP4 (official file) · 13 GB | 128K |
| 256 GB | 192 GB | MXFP4 (official file) · 13 GB | 128K |
| 512 GB | 384 GB | MXFP4 (official file) · 13 GB | 128K |
With its official MXFP4 file and an 8K context, gpt-oss 20B needs a Mac with at least 24 GB of unified memory. By default macOS lets the GPU use about two thirds of memory on Macs with 32 GB or less and about three quarters on larger ones; the table uses that limit. You can raise it with sudo sysctl iogpu.wired_limit_mb, leaving at least 8 GB for macOS.
Context
How much memory does gpt-oss 20B’s context use?
| Context | KV cache, FP16 | KV cache, 8-bit | Total (official file) |
|---|---|---|---|
| 8,192 | 0.2 GB | 0.1 GB | 13 GB |
| 32,768 | 0.8 GB | 0.4 GB | 13 GB |
| 131,072 | 3.0 GB | 1.6 GB | 16 GB |
gpt-oss 20B’s FP16 cache grows by about 23 MB for every 1,000 tokens once its windowed layers are full. At 8K tokens that is 0.2 GB, 2% of the total with its official MXFP4 file; at its full 131,072-token context it is 3.0 GB, 27% of the 11 GB of weights. 12 of its 24 layers use a sliding window of 128 tokens, so their cache is full after 128 tokens; only the 12 full-attention layers keep growing. On a 24 GB card with its official MXFP4 file, the longest context is about 128K tokens with an FP16 cache, its full context.
Download
How big is the gpt-oss 20B download?
| File | Bits per weight | Approximate size |
|---|---|---|
| MXFP4 (official file) | 4.63 | 11 GB |
gpt-oss 20B is published with its weights already in MXFP4, about 11 GB in all; a 16-bit copy of its 20.9B parameters would take about 39 GB.
Offload
Can you run gpt-oss 20B with less VRAM by offloading to RAM?
| GPU VRAM | In system RAM | RAM to have |
|---|---|---|
| 8 GB | 4.6 GB | 16 GB |
Yes: llama.cpp can keep part of gpt-oss 20B in system RAM and run it on the CPU, so the GPU and RAM together need about 13 GB with its official MXFP4 file and an 8K context. On an 8 GB card that leaves 4.6 GB in RAM. Because only 4 of its 32 experts run for each token, the usual approach is to keep attention and shared layers on the GPU and move expert weights to RAM with --n-cpu-moe or -ot; each token then reads only a small part of what sits in RAM, so speed drops less than it would for a dense model of 20.9B parameters.
Compare
How does gpt-oss 20B compare with other gpt-oss models?
| Model | Parameters | Type | Q4 at 8K | Smallest GPU | Context on 24 GB |
|---|---|---|---|---|---|
| gpt-oss 20B | 20.9B | MoE | 13 GB | 16 GB | 128K |
| gpt-oss 120B | 116.8B | MoE | 65 GB | None | — |
gpt-oss 20B is number 1 by size of the 2 gpt-oss models we cover. The next larger, gpt-oss 120B, needs about 65 GB.
FAQ
Frequently asked questions
How much VRAM does gpt-oss 20B need?
With an 8K context, about 13 GB using the official MXFP4 file (11 GB of weights). Local builds stay about that size whatever their quantisation label. That covers the weights, the KV cache and runtime overhead.
Can gpt-oss 20B run on a 24 GB GPU like the RTX 4090?
Yes: the best quality that fits with an 8K context is MXFP4 (official file), at about 13 GB, and at that setting it has room for about 128K tokens.
Can I run gpt-oss 20B on a Mac?
Yes: with its official MXFP4 file and an 8K context it fits a Mac with 24 GB of unified memory using macOS’s default GPU memory limit (about 16 GB for the GPU).
Can gpt-oss 20B run on 12 GB?
Best quality with an 8K context: 12 GB: no (the official file needs 13 GB).
Why does gpt-oss 20B need so much memory if only 4 experts are active?
Each token uses 4 of its 32 experts, but a different set for every token, so all 20.9B parameters must stay loaded: about 11 GB of weights with its official MXFP4 file. The active experts make it fast, not small.
How big is the gpt-oss 20B download?
The official MXFP4 release is about 11 GB; a 16-bit copy would be about 39 GB.
Related
Try other settings
Try other settings in the VRAM calculator
- Guide: How much VRAM do you need to run an LLM locally?
- Glossary: Quantisation, GGUF, KV cache, Mixture of experts
Keep exploring