Skip to content

How to Run gpt-oss Locally: Hardware Requirements and Setup for gpt-oss-20b and 120b

OpenAI's open-weight gpt-oss models run on your own hardware. A complete guide: model specs, exact memory requirements, which GPUs, Macs and mini PCs work, real tokens-per-second results, how to run gpt-oss-120b on a 24 GB GPU with MoE offloading, step-by-step setup in Ollama, LM Studio, llama.cpp and vLLM, reasoning effort settings, and troubleshooting.

5 min read

Run gpt-oss Locally — run gpt-oss locally

Short answer

To run gpt-oss locally, you need about 16 GB of GPU memory for gpt-oss-20b and about 80 GB for gpt-oss-120b (or a 24–32 GB GPU plus 64–128 GB of system RAM using mixture-of-experts offloading). Both models were released by OpenAI in August 2025 under the Apache 2.0 licence, use MXFP4 quantization natively and support a 128K context. Because only 3.6B (20b) or 5.1B (120b) parameters are active per token, they run fast: about 92 tokens/s for gpt-oss-20b on an RTX 5060 Ti 16 GB and about 163 tokens/s for gpt-oss-120b on an RTX PRO 6000, with roughly 55–88 tokens/s on 128 GB unified-memory machines. The easiest way to start is ollama run gpt-oss:20b.

gpt-oss model specs

gpt-oss-20bgpt-oss-120b
Total parameters~21 billion~117 billion
Active parameters per token~3.6 billion~5.1 billion
Layers2436
Experts (active per token)32 (4)128 (4)
Context length128K tokens128K tokens
Weights formatMXFP4 for MoE layersMXFP4 for MoE layers
Download size (approx.)~13 GB~63–65 GB
Target memory16 GB80 GB
Comparable to (per OpenAI)o3-mini on common benchmarkso4-mini on common benchmarks
LicenceApache 2.0Apache 2.0
ReleaseAugust 5, 2025August 5, 2025

Both are reasoning models with adjustable reasoning effort (low, medium, high), tool use and the "harmony" chat format. They are mixture-of-experts models, which is why they are fast for their size.

Hardware requirements

gpt-oss-20b

HardwareWorks?Expected speed
16 GB GPU (RTX 5060 Ti 16 GB, 4060 Ti 16 GB, 5070 Ti)Yes~90 tok/s on RTX 5060 Ti (4K context)
24 GB GPU (RTX 3090/4090)Yes, with long context~148 tok/s on RTX 3090
32 GB GPU (RTX 5090)YesFaster still
Mac with 24–32 GB unified memoryYesGood
12 GB GPUWith partial offloadSlower
CPU only, 32 GB RAMWorksSlow but usable for testing

gpt-oss-120b

HardwareWorks?Expected speed (single user)
RTX PRO 6000 Blackwell (96 GB)Yes, fully on GPU~163 tok/s (StorageReview)
H100 / H200 (80–141 GB)YesFast; see H200 specs
Mac with M5 Max, 128 GBYes~88 tok/s (MLX)
NVIDIA DGX Spark (128 GB)Yes~59 tok/s (llama.cpp)
AMD Ryzen AI Max+ 395 (128 GB)Yes~55 tok/s (Vulkan)
24–32 GB GPU + 64–128 GB fast RAMYes, with expert offloadRoughly 10–30 tok/s depending on RAM bandwidth
2 × 24 GB GPUs + RAMYes, with partial offloadModerate
Mac with 64 GBToo tight for comfortable use—

Benchmarks: RTX 5060 Ti 16GB for AI, RTX 3090 for AI, RTX PRO 6000 for AI, DGX Spark vs Mac Studio and Ryzen AI Max+ 395 for LLMs.

Context memory: long contexts need extra memory for the KV cache, and speed drops as context grows (gpt-oss-20b fell from about 148 to 62 tok/s at 128K context on an RTX 3090 in one test).

Option 1: Ollama (easiest)

ollama run gpt-oss:20b
ollama run gpt-oss:120b

Ollama handles download and chat format automatically and exposes an OpenAI-compatible API at http://localhost:11434/v1. Use --verbose to see tokens per second.

Option 2: LM Studio (graphical)

1. Install LM Studio. 2. Search "gpt-oss" and download the 20b or 120b model. 3. Choose GPU offload and context length, then chat or start the local server (port 1234). 4. Set reasoning effort in the chat settings.

See Ollama vs LM Studio.

Option 3: llama.cpp (most control, best for offloading)

# gpt-oss-20b fully on GPU
llama-server -hf ggml-org/gpt-oss-20b-GGUF -ngl 99 -c 32768 --jinja

# gpt-oss-120b on a 24-32 GB GPU: keep attention on GPU, offload some experts to CPU RAM
llama-server -hf ggml-org/gpt-oss-120b-GGUF -ngl 99 --n-cpu-moe 24 -c 16384 --jinja

MoE offloading: --n-cpu-moe N keeps the expert weights of the first N layers in system RAM while everything else stays on the GPU. Increase N until the model fits in VRAM. Fast dual-channel DDR5 or better RAM makes a big difference. Use --jinja so the chat template (harmony format) is applied correctly.

Option 4: vLLM (serving multiple users)

vllm serve openai/gpt-oss-120b
# OpenAI-compatible API at http://localhost:8000/v1

vLLM suits data center GPUs (H100, H200, B200) and multi-user serving. See vLLM vs SGLang and What is TensorRT-LLM?

Reasoning effort

EffortBehaviourUse for
LowShort reasoning, fastestChat, simple tasks
MediumBalanced (default)General use
HighLong reasoning, slowestMaths, coding, complex analysis

Set it in the system prompt (for example, "Reasoning: high") or your tool's settings. High effort generates many more tokens, so fast hardware matters. See tokens per second explained.

Cloud option

If your hardware isn't enough, rent a GPU: on December 1, 2026, our GPU price report listed H100s from $1.80/hour and RTX PRO 6000s from about $0.76/hour, both enough for gpt-oss-120b.

Troubleshooting

ProblemFix
Out of memoryUse 20b, reduce context, increase --n-cpu-moe, close other GPU apps; see CUDA out of memory
Garbled output or stray tagsUse the correct chat template (--jinja in llama.cpp, updated tool versions)
Very slow 120bCheck how many layers are offloaded; use faster RAM; lower reasoning effort
Tool calls not workingUse a recent runtime version with harmony format support
GPU not usedCheck drivers with nvidia-smi; ensure GPU build of your tool

gpt-oss vs other local models

Model classMemory (4-bit)Strength
gpt-oss-20b~13–16 GBFast reasoning on 16 GB GPUs
Dense 27–32B models~19 GBStrong general quality on 24 GB GPUs
gpt-oss-120b~63–80 GBNear frontier-class reasoning on one large GPU or 128 GB machine
70B dense models~40 GBStrong, but slower than gpt-oss-120b per token

See best open source LLMs to run locally and best GPU for local LLMs.

Frequently asked questions

How much VRAM do I need to run gpt-oss-20b?

About 16 GB. It runs well on 16 GB GPUs and Macs with 24 GB or more unified memory.

Can gpt-oss-120b run on an RTX 4090 or 5090?

Yes, with mixture-of-experts offloading to system RAM (64–128 GB recommended), at roughly 10–30 tokens/s depending on RAM speed.

Is gpt-oss free for commercial use?

Yes. Both models are released under the Apache 2.0 licence.

What is the fastest way to run gpt-oss locally?

Ollama (ollama run gpt-oss:20b) is the simplest; llama.cpp gives the most control; vLLM is best for serving many users on data center GPUs.

How good is gpt-oss compared with ChatGPT?

OpenAI reported gpt-oss-120b performs similarly to o4-mini and gpt-oss-20b similarly to o3-mini on common benchmarks.

Sources and further reading

Think you understand it now? Prove it.

Solve real Tensor Core math in the TensorCore.si Challenge and earn a certificate with your name.

Take the challenge

Leave a Reply

Your email address will not be published. Required fields are marked *