Instructions to use openai/gpt-oss-120b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/gpt-oss-120b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openai/gpt-oss-120b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-120b") model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
- Local Apps Settings
- vLLM
How to use openai/gpt-oss-120b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openai/gpt-oss-120b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openai/gpt-oss-120b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openai/gpt-oss-120b
- SGLang
How to use openai/gpt-oss-120b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openai/gpt-oss-120b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openai/gpt-oss-120b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openai/gpt-oss-120b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openai/gpt-oss-120b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openai/gpt-oss-120b with Docker Model Runner:
docker model run hf.co/openai/gpt-oss-120b
Add Zero-Trust Physics Environments 0.3 evaluation results
Adds this model's scores on Zero-Trust Physics Environments 0.3: 153 questions about real physical things (a reentry capsule, a reactor transient, a battery cell, a rover's generator, turbulent pipe flow), each answered by an agent whose only tool is a physics verifier over MCP. A program scores the answer by sending the agent's own request to the verifier again. There is no LLM judge.
- reward 23.53 (36 of 153): the answer is right, and every figure, stop and proof on the agent's card is borne out by the verifier.
- correct 26.14 (40 of 153) and kept_to_the_tool 45.75 (70 of 153), the two parts of reward.
How it was run (17 Oct 2026): gpt-oss-120b at medium reasoning, through the Antigravity CLI 1.4.0. Each task ran in an empty folder. Every harness tool other than the verifier was refused before it ran. Every model had one fixed system line and a cap of 20 verifier calls. The verifier was engine 0.14.0, built from its public source at tag v0.14.0.
Every reply and full trace is public: results/agy_gpt-oss-120b-medium. Anyone can score them again with python3 score.py results/agy_gpt-oss-120b-medium/replies --engine <binary>.
Two things to know:
- One scoring rule isn't stated in the tasks' words: a figure must come from
run_trajectoryorsolve, so a figure read fromcompute_stepscores 0. That cost this model 7 cards. Version 0.3.1 will state the rule or lift it, and every result will be scored again. - The dataset has an
eval.yaml(harbor) but isn't yet on Hugging Face's benchmark allow-list, so this result may not show on a leaderboard until it is.
This is a community result from Protocol Company, which makes the verifier. Close this pull request if you'd rather not carry it.