Text Generation
Transformers
Safetensors
gpt_oss
vllm
conversational
Eval Results
8-bit precision
mxfp4
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)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openai/gpt-oss-120b") model = AutoModelForCausalLM.from_pretrained("openai/gpt-oss-120b") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Language problem with the gpt oss 120b model.
#217 opened 13 days ago
by
MGSportiDavid
GPT-OSS-120B running on phone with 8GB of RAM
👀 1
3
#216 opened 14 days ago
by
InfiniteVoid
my_ai
😔 2
1
#215 opened 27 days ago
by
sachinpatel
120B model for agent orchestration
👍 1
#214 opened 2 months ago
by
O96a
Aichat
1
#213 opened 3 months ago
by
Impixel582626
🚩 Report: Copyright infringement
2
#212 opened 3 months ago
by
radice
Delete metal/model.bin
#211 opened 3 months ago
by
radice
Delete metal/model.bin
#210 opened 3 months ago
by
radice
Delete original/model--00001-of-00007.safetensors
#209 opened 3 months ago
by
radice
Delete original/model--00001-of-00007.safetensors
#208 opened 3 months ago
by
radice
Delete config.json
#207 opened 3 months ago
by
radice
Delete chat_template.jinja
#206 opened 3 months ago
by
radice
Delete chat_template.jinja
#205 opened 3 months ago
by
radice
Delete chat_template.jinja
#204 opened 3 months ago
by
radice
Delete model-00001-of-00014.safetensors
#203 opened 3 months ago
by
radice
Delete model-00001-of-00014.safetensors
#202 opened 3 months ago
by
radice
Delete model-00001-of-00014.safetensors
#201 opened 3 months ago
by
radice
Delete model-00001-of-00014.safetensors
#200 opened 3 months ago
by
radice
Delete model-00000-of-00014.safetensors
#199 opened 3 months ago
by
radice
Delete model-00000-of-00014.safetensors
#198 opened 3 months ago
by
radice
Delete model-00000-of-00014.safetensors
#197 opened 3 months ago
by
radice
Delete model-00013-of-00014.safetensors
#196 opened 3 months ago
by
radice
Delete model-00013-of-00014.safetensors
#195 opened 3 months ago
by
radice
Install & run openai/gpt-oss-120b easily using llmpm
#194 opened 3 months ago
by
sarthak-saxena
Add required extra dependency
#193 opened 3 months ago
by
samykamkar
Add evaluation results from GPT-OSS paper
#192 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#191 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#190 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#189 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#188 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#187 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#186 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#185 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#184 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#183 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#182 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#181 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#180 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#179 opened 3 months ago
by
SaylorTwift
Add evaluation results from GPT-OSS paper
#178 opened 3 months ago
by
SaylorTwift
Add SWE-Bench Pro evaluation results
#177 opened 3 months ago
by
nielsr
Upload Infex.py
#176 opened 4 months ago
by
Ananthusajeev190
Upload 9 files
#175 opened 4 months ago
by
Ananthusajeev190
Upload main.py
#174 opened 4 months ago
by
Ananthusajeev190
Inquiry About Military Use and Restrictions for US and Allied Nations
1
#173 opened 4 months ago
by
himenokentaF
Upload 6 files
1
#172 opened 5 months ago
by
Ananthusajeev190
Upload 5 files
#171 opened 5 months ago
by
Ananthusajeev190
Upload 312 files
#170 opened 5 months ago
by
Ananthusajeev190
If tool.description is null, it will trigger exception
#169 opened 5 months ago
by
hongloumeng
ClosedAI: MXFP4 is not Open Source
👍 7
1
#168 opened 5 months ago
by
Max-and-Omnis