openai /
gpt-oss-20b
OpenAI's open-weight 21B model for local use, reasoning and tool-calling tasks
- 5.2k likes
- 5.8M downloads a month
- 21B parameters
- Some experience
- Text & code
gpt-oss-20b is the smaller of two open-weight models in OpenAI's gpt-oss series (the other is gpt-oss-120b). It has 21B parameters with 3.6B active, and the card describes it as suited to lower latency and local or specialized use. It is released under Apache 2.0.
What sets it apart is that you can choose how hard it thinks (low, medium or high), see its full chain-of-thought, and fine-tune it on consumer hardware. It also supports function calling, web browsing, Python code execution and Structured Outputs. Honest limits: it was trained on the harmony response format and the card says it will not work correctly without it. The chain-of-thought is meant for debugging, not for showing to end users. The card gives no benchmark numbers for this model, so check the linked model card paper before relying on it for anything important.
What you need to run it
21B parameters. The weights take about 42 GB at full 16-bit precision (fits a 64 GB Mac or a GPU with 64 GB), or about 13 GB as a 4-bit download, which runs on a 16 GB Mac or a GPU with 16 GB. Long inputs and images need more memory on top.
What it does well
Runs in 16GB of memory
The MoE weights were post-trained with MXFP4 quantization, which lets gpt-oss-20b run within 16GB of memory. The card says all evals were done with this same quantization.
Adjustable reasoning effort
You pick low, medium or high in the system prompt, for example "Reasoning: high". Low gives fast replies for general chat, medium balances speed and detail, and high gives deeper analysis.
Full chain-of-thought
You can see the model's reasoning, which helps with debugging and checking its answers. The card says it is not intended to be shown to end users.
Agentic features built in
It supports function calling with defined schemas, web browsing, Python code execution and Structured Outputs.
Fine-tunable on consumer hardware
The card says this smaller model can be fine-tuned on consumer hardware, and the licence is Apache 2.0.
What you could build
- Run a chat assistant locally on your own machine with Ollama or LM Studio
- Build a small agent that calls your own functions using defined schemas
- Compare low, medium and high reasoning on the same homework-style question and see how the answers and speed differ
- Fine-tune it on your own data for a specialized task
- Stand up an OpenAI-compatible local server with Transformers Serve or vLLM to test an app
Get started
The easiest route on a consumer machine is Ollama: install it, then pull and run the model. If you prefer Python, install the Transformers dependencies and use the pipeline snippet from the card, which applies the harmony format through the chat template.
ollama pull gpt-oss:20bollama run gpt-oss:20bpip install -U transformers kernels torchlms get openai/gpt-oss-20bCommands are copied from the model card. Read it on Hugging Face for the full setup.