gpt-oss
A collection of reference inference implementations for gpt-oss by OpenAI
What it is and what it does
gpt-oss is a Python package providing reference implementations for inference with OpenAI's open-weight models: gpt-oss-120b and gpt-oss-20b. Both models use the harmony response format and support reasoning effort configuration, chain-of-thought output, function calling, and structured outputs. The package includes PyTorch, Triton, and Metal backends for different hardware targets and integrates with inference frameworks for OpenAI-compatible API serving.
The package depends on openai-harmony for format handling, plus a broad stack of web, async, and serialization libraries (fastapi, aiohttp, pydantic, lxml, requests, structlog, tenacity, uvicorn, docker, jupyter-client, tiktoken, termcolor, chz). It is designed for developers who want to run these models locally or in custom inference pipelines, with particular emphasis on agentic use cases and fine-tuning.
Use it for:
- Run gpt-oss-20b locally for low-latency reasoning tasks with constrained hardware
- Deploy gpt-oss-120b for production general-purpose reasoning on high-end GPUs
- Build agentic systems using the models' native function calling and web-browsing capabilities
- Fine-tune gpt-oss models to specialized domains via parameter adjustment
- Integrate inference into fastapi applications using the reference implementations
- Debug model reasoning by accessing full chain-of-thought output
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides reference implementations for running OpenAI's gpt-oss-120b and gpt-oss-20b open-weight models locally, with support for PyTorch, Triton, and Metal inference backends.
Yes, with conditions. Install if you need reference code for running gpt-oss models locally and have the required GPU hardware. Verify the license terms before production use. The aging maintenance status and unavailable repository metadata mean you should confirm that the package still works with current versions of dependencies before committing to it for critical workloads.
Install
gpt-oss on PyPI
pip
pip install gpt-ossuv
uv add gpt-osspoetry
poetry add gpt-ossInstalling gpt-oss
Before you install
Low install friction with a pure-Python wheel. Maintenance status is aging—the package has not been updated since its initial release, and repository metadata is unavailable, making it unclear whether active development continues.
License in practice
License treatment is unclear; no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms before deploying in production or modifying the code.
Quickstart
pip install gpt-oss
from openai_harmony import (
load_harmony_encoding,
Conversation,
Message,
Role,
SystemContent,
)
encoding = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
convo = Conversation.from_messages([Message.from_role_and_content(Role.USER, "What is the weather?")])
Requires Python >=3.12. Running inference requires significant GPU memory. Models must be used with the harmony response format or they will not work correctly.
Verify before relying
- Whether repository is actively maintained or archived—metadata unavailable
- Exact license terms and any commercial use restrictions
- GPU memory requirements for different model sizes and quantization settings
- Production readiness of PyTorch/Triton/Metal reference implementations
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 15 — openai-harmony, tiktoken, aiohttp, chz, docker, fastapi, html2text, lxml, pydantic, structlog, tenacity, uvicorn, requests, termcolor, jupyter-client |
| Maintenance | aging — 213 days since the last release |
| First released | |
| Downloads | 88,119/month — #13,747 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gpt_oss-0.0.9-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
openai-harmonyRenders and parses the Harmony response format…
unclear · top 5,000 on PyPI
tpu-inferencetpu-inference is a hardware plugin for vLLM…
permissive · top 15,000 on PyPI
llama-index-agent-openaiIntegrates OpenAI language models with…
permissive · top 5,000 on PyPI
ipex-llmAccelerates large language model inference on…
permissive · top 15,000 on PyPI
vllm-tpuvllm-tpu is a high-throughput LLM inference and…
permissive · top 15,000 on PyPI
liger-kernelLiger Kernel provides optimized Triton kernels…
permissive · top 15,000 on PyPI
nvidia-modeloptApplies state-of-the-art model optimization…
permissive · top 15,000 on PyPI
torchaoTorchAO applies quantization and sparsity…
unclear · top 5,000 on PyPI
pytorch-pretrained-bertProvides PyTorch implementations of BERT, GPT,…
permissive · top 15,000 on PyPI
openvinoOpenVINO converts and optimizes deep learning…
permissive · top 5,000 on PyPI