Use this file to discover all available pages before exploring further.
Running gpt-oss locally means your prompts, completions, and reasoning traces stay entirely on your own hardware — no API keys, no data leaving your machine, and no per-token costs after setup. Both Ollama and LM Studio handle the OpenAI Harmony chat template automatically, so you can point the standard OpenAI Python client at your local server without changing your application code. This guide covers both tools and helps you pick the right one for your setup.
Both model sizes ship in MXFP4 quantized format. This sets the minimum VRAM (or unified memory on Apple Silicon) you need:
Model
Minimum VRAM
Recommended hardware
gpt-oss-20b
16 GB
High-end consumer GPU (RTX 4090), Apple Silicon Mac (M2 Pro or later)
gpt-oss-120b
60 GB
Multi-GPU workstation, Mac Pro with M2 Ultra, or H100-class server
You can offload layers to CPU RAM if you are short on VRAM, but expect significantly slower generation speeds. For server deployments with dedicated GPU hardware, see the vLLM guide.
Ollama is the fastest way to get gpt-oss running. It installs as a single binary, manages model downloads, applies the Harmony chat template automatically, and exposes an OpenAI-compatible HTTP API at localhost:11434.
Download and install Ollama for your operating system from ollama.com/download, or use the install script on Mac and Linux:
# Install Ollama (mac/linux)curl -fsSL https://ollama.com/install.sh | sh
On Windows, download and run the .exe installer from the Ollama website.
2
Pull the model
Download the model weights. This will take a few minutes depending on your connection:
# Pull the modelollama pull gpt-oss-20b
To use the full 120B model instead:
ollama pull gpt-oss-120b
3
Run the model
Start an interactive chat session directly in your terminal:
# Run the modelollama run gpt-oss-20b
Ollama applies the Harmony chat template and handles chain-of-thought routing automatically. Type your message and press Enter to start the conversation.
Ollama exposes a Chat Completions-compatible API at http://localhost:11434/v1. Point the OpenAI Python client at this URL to use it as a drop-in replacement:
Ollama supports function calling through the standard tools parameter:
tools = [ { "type": "function", "function": { "name": "get_weather", "description": "Get current weather in a given city", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"] }, }, }]response = client.chat.completions.create( model="gpt-oss-20b", messages=[{"role": "user", "content": "What's the weather in Berlin right now?"}], tools=tools)print(response.choices[0].message)
The gpt-oss models perform tool calls as part of their chain-of-thought. When handling a tool call response, pass the returned reasoning back into the next request alongside the tool output so the model can continue its reasoning correctly.
LM Studio is a desktop application for Windows, macOS, and Linux. It provides a graphical interface for downloading and chatting with local models, and exposes a local API server for programmatic access. It is a good choice if you prefer a GUI-based workflow or want to experiment with models without using the command line.LM Studio loads gpt-oss models in GGUF format via llama.cpp, and on Apple Silicon Macs it also supports the Apple MLX engine for faster inference. The Harmony chat template is applied automatically via LM Studio’s built-in integration with OpenAI’s harmony library.
Download LM Studio for your operating system from lmstudio.ai/download. It is available for Windows, macOS, and Linux.
2
Download the model
Download the model using the lms CLI:
# For gpt-oss-20blms get openai/gpt-oss-20b# For gpt-oss-120blms get openai/gpt-oss-120b
Alternatively, use the Discover tab inside LM Studio to search for openai/gpt-oss-20b and click Download.
3
Load the model
Load the model so it is ready for inference:
# For gpt-oss-20blms load openai/gpt-oss-20b
In the LM Studio UI, go to the My Models tab and click Load next to the model you downloaded.
4
Start a chat or enable the local server
To chat interactively, go to the Chat tab in LM Studio and select your loaded model.To enable API access, go to the Developer tab and toggle on Start Server. LM Studio will expose a Chat Completions-compatible API at http://localhost:1234/v1 by default.
LM Studio uses the GGUF file format (via llama.cpp) for model storage and inference. GGUF bundles model weights and configuration metadata into a single portable file. This format is widely supported across local inference tools and enables quantization options that reduce memory requirements. LM Studio handles downloading the correct GGUF files automatically when you search for openai/gpt-oss-20b.
Apple Silicon: Both Ollama and LM Studio use Metal GPU acceleration on Apple Silicon Macs automatically. The gpt-oss-20b model fits comfortably in the unified memory of M2 Pro (16 GB) or better.
Quantization: Both tools use MXFP4 quantization by default, which provides good performance while keeping memory usage low. There is currently no alternative quantization available for gpt-oss models.
CPU offloading: If you have less VRAM than the model requires, layers can spill to CPU RAM, but generation will be noticeably slower. Consider using the 20b model if the 120b does not fit in your VRAM.
Context length: Longer contexts require more memory and slow down generation. Start with shorter prompts when testing on hardware near the minimum spec.
Background applications: Close other GPU-intensive applications before loading the model to maximize available VRAM.