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", 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=40) 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
Request: 4-bit GPTQ or AWQ quantized version of openai/gpt-oss-20b
🚀❤️ 19
13
#32 opened 12 months ago
by
powtac
Benchmaxed with no world knowledge or intuition. (ex. Wheelies on a motorcycle do not use front brakes to adjust the height b/c the front wheel is already off the ground duh)
👍 8
#31 opened 12 months ago
by
TroyDoesAI
Streaming Issue
1
#29 opened 12 months ago
by
seanliu96
Model claims to be GPT4-Turbo - any explanation behind this?
3
#28 opened 12 months ago
by
marksverdhei
Web browsing (using built-in browsing tools)
1
#27 opened 12 months ago
by
eryk-mazus
Knowledge limitations
👍 2
5
#25 opened 12 months ago
by
hexess
VLLM - Flash-attn 3
12
#23 opened 12 months ago
by
chriswritescode
From 🤗 to 🤯 — The Evolution
❤️🔥 9
2
#22 opened 12 months ago
by
gokularaman
Recommended Sampling Parameters
👍 4
5
#21 opened 12 months ago
by
YunfanZhang42
Promise kept, excellent work. Thank you
❤️ 1
#20 opened 12 months ago
by
TestregX
poor multi language support
😔👍 5
8
#19 opened 12 months ago
by
devops724
OpenAI
❤️ 2
1
#18 opened 12 months ago
by
nanowell
Function calling doesn't work
7
#17 opened 12 months ago
by
patrickvonplaten
Finally OpenAI
🚀 2
1
#16 opened 12 months ago
by
nitinprajwal
gpt-oss not supporting OpenAI Agents SDK tools
5
#13 opened 12 months ago
by
davidduyun
how to finetune this model?
👍 2
3
#11 opened 12 months ago
by
daiwk
Witnessing History
#8 opened 12 months ago
by
Lazycuber
OpenAI is finally open.
🤗🔥 13
#7 opened 12 months ago
by
anupbhat
GG WP
#6 opened 12 months ago
by
alexcarter1
I was there
🤝 2
1
#4 opened 12 months ago
by
Fotachu
OSS FTW!
🚀😔 3
2
#2 opened 12 months ago
by
nanowell
note: to expensive to run
🔥🤗 2
11
#1 opened 12 months ago
by
MichaelBoll