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.

QuantizationWeightsTotal at 8K contextTotal at 32K context
MXFP411.3 GB12.6 GB13.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).

Hardware8K context32K context
NVIDIA GeForce RTX 3060 12GBOffload MXFP4 (~20 layers on GPU)Offload MXFP4 (~19 layers on GPU)
NVIDIA GeForce RTX 4060 Ti 16GBMXFP4 (12.6 GB)MXFP4 (13.2 GB)
AMD Radeon RX 9070 XTMXFP4 (12.6 GB)MXFP4 (13.2 GB)
NVIDIA GeForce RTX 4090MXFP4 (12.6 GB)MXFP4 (13.2 GB)
Mac with M4 (16 GB)Doesn’t fitDoesn’t fit
Mac with M4 (24 GB)MXFP4 (12.6 GB)MXFP4 (13.2 GB)

Try your own setup

Model
Your hardware
Context length (tokens)
Assumptions

Result

Fits fully

gpt-oss 20B (MoE) · MXFP4 · 32K → NVIDIA GeForce RTX 4060 Ti 16GB. 1.24 GB of headroom.

Bar: memory needed vs. usable memory (marker).
Memory breakdown
ComponentMemory
Weightsactual GGUF file: MXFP411.3 GB
KV cache32K tokens × 1 seq, F160.75 GB
Runtime overhead10% of weights1.13 GB
Total needed13.2 GB
Usable on your hardware90% of 16.0 GB14.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.cpp
llama-server -hf ggml-org/gpt-oss-20b-GGUF:MXFP4 -c 32768 -ngl 999
ollama
OLLAMA_CONTEXT_LENGTH=32768 ollama serve
ollama run hf.co/ggml-org/gpt-oss-20b-GGUF:MXFP4
Model 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.