Can I run gpt-oss 20B locally?
gpt-oss 20B is a mixture-of-experts model with about 3.6B active parameters, released in the 4-bit MXFP4 format. The GGUF file is about 11.3 GB.
Half of its 24 layers use a 128-token sliding window, so long context is cheap: the total is about 12.6 GB at 8K tokens and about 13.2 GB at 32K.
Estimates with default assumptions: 10% runtime overhead, ~90% usable VRAM (~72% on Macs), FP16 KV cache, one sequence. Model data synced from Hugging Face on 2026-11-23. Methodology.
gpt-oss 20B (MoE): memory by quantization
21.0B parameters, 24 layers. Weights are real GGUF file sizes from ggml-org/gpt-oss-20b-GGUF.
| Quantization | Weights | Total at 8K context | Total at 32K context |
|---|---|---|---|
| MXFP4 | 11.3 GB | 12.6 GB | 13.2 GB |
Which hardware runs gpt-oss 20B (MoE)?
Highest-quality quantization that fits fully. “Offload” means it runs only with part of the model in system RAM (64 GB assumed).
| Hardware | 8K context | 32K context |
|---|---|---|
| NVIDIA GeForce RTX 3060 12GB | Offload MXFP4 (~20 layers on GPU) | Offload MXFP4 (~19 layers on GPU) |
| NVIDIA GeForce RTX 4060 Ti 16GB | MXFP4 (12.6 GB) | MXFP4 (13.2 GB) |
| AMD Radeon RX 9070 XT | MXFP4 (12.6 GB) | MXFP4 (13.2 GB) |
| NVIDIA GeForce RTX 4090 | MXFP4 (12.6 GB) | MXFP4 (13.2 GB) |
| Mac with M4 (16 GB) | Doesn’t fit | Doesn’t fit |
| Mac with M4 (24 GB) | MXFP4 (12.6 GB) | MXFP4 (13.2 GB) |
Try your own setup
Result
Fits fully
gpt-oss 20B (MoE) · MXFP4 · 32K → NVIDIA GeForce RTX 4060 Ti 16GB. 1.24 GB of headroom.
| Component | Memory |
|---|---|
| Weightsactual GGUF file: MXFP4 | 11.3 GB |
| KV cache32K tokens × 1 seq, F16 | 0.75 GB |
| Runtime overhead10% of weights | 1.13 GB |
| Total needed | 13.2 GB |
| Usable on your hardware90% of 16.0 GB | 14.4 GB |
- Mixture-of-experts: all experts must be in memory, so memory uses total parameters. Speed depends on active parameters.
Run it
Starting point, not a guarantee. Downloads the GGUF from Hugging Face.
llama-server -hf ggml-org/gpt-oss-20b-GGUF:MXFP4 -c 32768 -ngl 999OLLAMA_CONTEXT_LENGTH=32768 ollama serve
ollama run hf.co/ggml-org/gpt-oss-20b-GGUF:MXFP4Model details
- Parameters
- 21.0B (3.6B active)OpenAI gpt-oss model card: 21B total parameters (repo stores MXFP4-packed weights, so the safetensors count is not the parameter count)
- Layers
- 24
- Attention
- Sliding-window + global layers12× window 128 (8 KV × 64) · 12× full (8 KV × 64)
- Max context
- 128K
- License
- apache-2.0
- Config source
- openai/gpt-oss-20bsynced 2026-10-18
Questions
Does gpt-oss 20B fit on a 16 GB GPU?
Yes. About 12.6 GB at 8K context fits the ~14.4 GB usable on a 16 GB card, including at 32K context.
What about a 12 GB RTX 3060?
Not fully: about 10.8 GB is usable, so it runs with partial CPU offload (about 20 of 24 layers on the GPU at 8K context). It works, but slower than on a 16 GB card.
Which Macs can run it?
With the default 72% of unified memory usable, 16 GB Macs fall just short (about 11.5 GB usable) and 24 GB Macs fit it with room to spare.