skillfed

gpt-oss

A collection of reference inference implementations for gpt-oss by OpenAI

gpt-oss v0.0.9 88.1K downloads/30d#13,747 on PyPI
License unclear AGING released

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-oss

uv

uv add gpt-oss

poetry

poetry add gpt-oss

Installing 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

gpt-oss inference implementationlocal llm deployment referenceopen weight model servingpytorch triton metal inferencegpt-oss-120b gpt-oss-20b setupharmony format model inferenceagentic llm reference code
llm-inferencereference-implementationgpu-required

More Artificial Intelligence packages