Back to Article List

How to run gpt-oss with Ollama (20b and 120b)

How to run gpt-oss with Ollama (20b and 120b)

gpt-oss is OpenAI's pair of open-weight models, built for reasoning and agentic tasks, and the smaller one runs on hardware you might already own. That combination made it one of the most pulled models in the Ollama library within months of release. This guide covers both sizes, the reasoning effort setting that makes them unusual, the cloud tags and what to expect on real hardware.

What gpt-oss is

Two models, released under the Apache 2.0 license, which the gpt-oss model page notes means no copyleft restrictions and no patent risk. You can ship it inside a commercial product without a lawyer meeting. Both support a 128K context, function calling, structured outputs and full access to the reasoning trace, so you see how the model reached its answer rather than taking it on faith.

The sizes:

  • gpt-oss:20b, a 14GB download that runs on systems with as little as 16GB of memory. This is the default "latest" tag.
  • gpt-oss:120b, a 65GB download that fits on a single 80GB GPU.

Why gpt-oss:20b fits in 16GB (MXFP4 explained)

A 20B-parameter model in 14GB looks wrong if you're used to Q4 arithmetic, and the answer is MXFP4 quantization. OpenAI quantized the mixture-of-experts weights, which make up the bulk of the model, to 4.25 bits per parameter at training time rather than as an afterthought. The practical effect is a model that keeps its quality while shrinking to a size a 16GB machine can hold.

That makes the 20b the interesting one for most people. It's a genuine reasoning model, with tool calling, that fits the same memory budget as a 13B from the previous generation. On a 16GB GPU it runs fully in VRAM; on a 16GB RAM machine without a GPU it runs, slowly, which we'll get to.

Running gpt-oss with Ollama

With Ollama installed (our Ollama Ubuntu install guide covers that in one command), pull and run:

ollama run gpt-oss:20b

The 14GB download takes a while, so start it before making coffee rather than after. Once loaded, ask it something multi-step and watch the reasoning phase run before the answer appears. Check ollama ps in another terminal: you want 100% GPU if you have the VRAM for it.

Two practical notes for daily use. Loading 14GB of weights takes noticeably longer than an 8B model, and Ollama unloads idle models after a few minutes, so set OLLAMA_KEEP_ALIVE to a longer duration if gpt-oss is your main model and you'd rather not pay the cold start on every session. And if you want a browser front end, Open WebUI displays the reasoning trace as a collapsible section, which suits this model well; our Open WebUI and Ollama setup guide gets you there in one Docker command.

The 120b is the same command with a bigger tag:

ollama run gpt-oss:120b

At 65GB it wants a single 80GB card, which puts it out of consumer territory and into the range of a rented GPU VPS with a large-VRAM card such as a 96GB RTX PRO 6000 Blackwell. If you can get that class of hardware, the 120b is one of the strongest open models you can run on a single GPU today.

Reasoning effort levels: low, medium and high

Here's the feature that separates gpt-oss from most local models: you dial the reasoning up or down per request instead of picking a thinking or non-thinking model. Low effort answers fast with minimal reasoning. High effort burns far more tokens thinking and earns it on hard problems. Medium is the sensible default.

One quirk documented in Ollama's thinking docs: gpt-oss requires the think parameter to be a level string, so "low", "medium" or "high". A boolean, which works for DeepSeek-R1 and Qwen 3, is ignored here. In an interactive session you can toggle thinking with /set think and /set nothink.

My rule after a few weeks of use: low for extraction, formatting and anything you'd give a normal 8B model; medium for daily assistant work; high only when the answer is worth waiting for, like a tricky migration plan or a proof. The quality difference between low and high on hard problems is large enough that this one setting effectively gives you two models in one download.

The cloud tags and what they change

The library also lists gpt-oss:20b-cloud and gpt-oss:120b-cloud. Same models, different execution: your prompt leaves your machine and runs on Ollama's hosted service, with the local CLI acting as a thin client. That's handy for trying the 120b without 80GB of VRAM, and it changes the privacy story completely. If your reason for running local models is that prompts and data stay on your own server, the cloud tags quietly give that up. Worth knowing before you paste anything sensitive into what looks like a local session; the non-cloud tags keep everything on your hardware.

Tool calling and agentic use

gpt-oss was built with agentic use in mind. The model page lists function calling, web browsing, python tool calls and structured outputs among its capabilities, and in practice it's one of the more reliable open models at emitting well-formed tool calls instead of prose that looks like JSON. That reliability is what matters when an agent framework parses the output mechanically. We use the same trait in our guides to wiring local models into agents, like running OpenClaw with Ollama local models, where a model that fumbles tool syntax turns every automation into babysitting.

Using gpt-oss over the API

The chat endpoint takes the effort level in the think field and returns reasoning separately from the answer:

curl http://localhost:11434/api/chat -d '{
  "model": "gpt-oss:20b",
  "messages": [
    {"role": "user", "content": "Plan a zero-downtime Postgres 15 to 17 upgrade."}
  ],
  "think": "high",
  "stream": false
}'

The response carries the trace in message.thinking and the answer in message.content, so your application can log one and display the other. Streaming, the OpenAI-compatible endpoint and error handling are covered in our Ollama API guide; the OpenAI compatibility is convenient here since most codebases already speak that format.

Performance on CPU vs GPU

Honest numbers matter more than hopeful ones. On a 16GB GPU the 20b feels like a hosted service: prompt processing is quick and tokens stream faster than you read. On CPU with 16GB of RAM it works, and that's the kindest word for it. The MoE design helps, since only a fraction of the weights activate per token, but high-effort reasoning on CPU means minutes of thinking before the first answer token. Usable for scheduled jobs and queues. Painful for chat.

Between those extremes, partial GPU offload on a smaller card is worth testing before you dismiss it. Our Ollama hardware requirements guide covers how to read ollama ps and size the split. For the 120b, don't bother with CPU at all; it's a GPU model, full stop.

gpt-oss vs DeepSeek-R1

People usually choose between these two, so here's the short version. The R1 distills give you reasoning at more size points (1.5b up to 70b), which helps on small hardware, and we've covered them in depth in our guide to running DeepSeek-R1 with Ollama. gpt-oss counters with adjustable effort, stronger tool calling and a 20b that outclasses similarly-sized distills on agentic tasks. My split: R1 for pure reasoning puzzles on modest hardware, gpt-oss:20b as the daily driver on a 16GB machine, and gpt-oss:120b over any distill if you have the VRAM.

Confirming your setup works

Three checks before you build on it. Confirm placement with ollama ps after a generation; a 20b showing a CPU/GPU split on a 16GB card usually means the context is set too high for the remaining VRAM. Send the same hard prompt at "low" and "high" effort and compare traces in message.thinking; if they look identical, your client is dropping the think parameter somewhere. And remember the context defaults to 4096 tokens even though the model supports 128K, so raise num_ctx or OLLAMA_CONTEXT_LENGTH before feeding it long documents, or the reasoning will happily analyze a truncated file without telling you.

F A Q

Can I use gpt-oss commercially?

Yes. Apache 2.0 permits commercial use, modification and redistribution, includes a patent grant and carries no copyleft obligations. You can fine-tune it, embed it in a product and keep your own code closed. Keep the license and attribution notices with the weights and you're compliant.

Race towards the future

Unrivaled speed meets competitive pricing

Ready in seconds 7-day money-back guaranteeA risk-free way to try LumaDock. Covers the GPU VPS plan on your first order. Cancel anytime
Строк Оплати

GPU.T4

587.01 zł Save  19 %
476.26 Щомісячно
  • Виділений GPU
  • Tesla T4

  • 16 GB GDDR6vRAM
  • 2560CUDA CORES
  • Віртуальний сервер
  • 8 vCPUAMD EPYC
  • 32 GBПАМ'ЯТЬ ECC
  • 250 GB NVMeСХОВИЩЕ
  • Безлімітний трафік
  • IPv4 & IPv6 включено Підтримка IPv6 наразі недоступна у Франції, Фінляндії чи Нідерландах.

GPU.ADA4000SFF

1104.28 zł Save  17 %
919.62 Щомісячно
  • Виділений GPU
  • RTX 4000 SFF Ada

  • 20 GB GDDR6 ECCvRAM
  • 6144CUDA CORES
  • Віртуальний сервер
  • 16 vCPUAMD EPYC
  • 64 GBПАМ'ЯТЬ ECC
  • 350 GB NVMeСХОВИЩЕ
  • Безлімітний трафік
  • IPv4 & IPv6 включено Підтримка IPv6 наразі недоступна у Франції, Фінляндії чи Нідерландах.

GPU.PRO4000SFF

1325.87 zł Save  17 %
1104.28 Щомісячно
  • Виділений GPU
  • RTX PRO 4000 Blackwell

  • 24 GB GDDR7 ECCvRAM
  • 8960CUDA CORES
  • Віртуальний сервер
  • 16 vCPUAMD EPYC
  • 64 GBПАМ'ЯТЬ ECC
  • 400 GB NVMeСХОВИЩЕ
  • Безлімітний трафік
  • IPv4 & IPv6 включено Підтримка IPv6 наразі недоступна у Франції, Фінляндії чи Нідерландах.

GPU.PRO4500

1879.86 zł Save  20 %
1510.54 Щомісячно
  • Dedicated GPU
  • RTX PRO 4500 Blackwell

  • 32 GB GDDR7 ECCvRAM
  • 10496CUDA CORES
  • Virtual Server
  • 16 vCPUAMD EPYC
  • 64 GBECC MEMORY
  • 450 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

GPU.PRO5000

2581.57 zł Save  20 %
2064.52 Щомісячно
  • Dedicated GPU
  • RTX PRO 5000 Blackwell

  • 48 GB GDDR7 ECCvRAM
  • 14080CUDA CORES
  • Virtual Server
  • 32 vCPUAMD EPYC
  • 96 GBECC MEMORY
  • 500 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

GPU.PRO6000

4428.19 zł Save  19 %
3578.75 Щомісячно
  • Dedicated GPU
  • RTX PRO 6000 Blackwell

  • 96 GB GDDR7 ECCvRAM
  • 24064CUDA CORES
  • Virtual Server
  • 32 vCPUAMD EPYC
  • 128 GBECC MEMORY
  • 650 GB NVMeSTORAGE
  • Unmetered bandwidth
  • IPv4 & IPv6IPv6 is currently unavailable in France, Finland or the Netherlands. included

*VAT excluded.

INCLUDED WITH EVERY PLAN

No setup fees 1 Gbps network
Free server monitoring Firewall management 24/7 support KVM virtualization