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
Add evaluation results from GPT-OSS paper
#178 opened 5 months ago
by
SaylorTwift
Add SWE-Bench Pro evaluation results
#177 opened 5 months ago
by
nielsr
Upload Infex.py
#176 opened 6 months ago
by
Ananthusajeev190
Upload 9 files
#175 opened 6 months ago
by
Ananthusajeev190
Upload main.py
#174 opened 6 months ago
by
Ananthusajeev190
Inquiry About Military Use and Restrictions for US and Allied Nations
1
#173 opened 6 months ago
by
himenokentaF
Upload 6 files
1
#172 opened 7 months ago
by
Ananthusajeev190
Upload 5 files
#171 opened 7 months ago
by
Ananthusajeev190
Upload 312 files
#170 opened 7 months ago
by
Ananthusajeev190
If tool.description is null, it will trigger exception
#169 opened 7 months ago
by
hongloumeng
ClosedAI: MXFP4 is not Open Source
👍 7
1
#168 opened 7 months ago
by
Max-and-Omnis
Create configfars_prompt.txt
#167 opened 7 months ago
by
Parham9292
Create configfars_prompt.txt
#166 opened 7 months ago
by
Parham9292
Request: Tensor alignment (256) for llama.cpp quantization
#165 opened 8 months ago
by
kusanagi-hf
can i load the local model without internet?
#164 opened 8 months ago
by
jcasjcj
Add Artificial Analysis evaluations for gpt-oss-120b
#162 opened 8 months ago
by
SeasonalFall84
Please move metal/ and original/ folder in a separate branch
👍 4
2
#160 opened 8 months ago
by
mratsim
How many graphics cards are needed to train OSS-120B using GRPO?
1
#158 opened 8 months ago
by
wanghongyu1111
gpt-weights
#157 opened 8 months ago
by
airawat123
Suggesting an open-weight Gpt-Oss LLM between the 20B and 120B parameters
#156 opened 9 months ago
by
rtzurtz
Trouble using GPT-OSS 120B via MCP (repro + logs inside)
🚀🔥 3
#155 opened 9 months ago
by
abdelhafidmrh
Small changes in readme for Vllm serve
2
#154 opened 9 months ago
by
Navanit-AI
RuntimeError: expected scalar type Float but found BFloat16 during activation capture
#153 opened 9 months ago
by
ojas03
An error occurred when generating a response.
#152 opened 9 months ago
by
pauls123
Parallel Tool Calling not working in latest commit
👍 1
20
#151 opened 9 months ago
by
mirzads
GPT-OSS 120B
#150 opened 9 months ago
by
elly99
Reinforcement Learning example
#148 opened 10 months ago
by
danielhanchen
So much censorship!
👍 7
1
#147 opened 10 months ago
by
mv2woods
An infinitty max input tokenizer token length
👍 2
1
#146 opened 10 months ago
by
kdduha
Update README.md
#143 opened 10 months ago
by
hallisky
gpt-oss-120b
#141 opened 11 months ago
by
cemfcelebi
Issue with tokenizer_config.json
👍 3
#140 opened 11 months ago
by
LucaF
Failed in vllm inference
1
#139 opened 11 months ago
by
Mqleet
Update README.md
#137 opened 11 months ago
by
lulavc
gpt-oss 120b AMD GPU output problem
👍 1
#136 opened 11 months ago
by
gfatigati
Update Readme.md add multilingual language tag
#135 opened 11 months ago
by
TahirC
Can gpt-oss support local deployment on V100 GPU?
#134 opened 11 months ago
by
SPGZXB
gpt-oss-120b has high possibility to generate response as part of reasoning
#133 opened 11 months ago
by
tonyaw
AIME eval script does not score correctly some answers
👀 2
#132 opened 11 months ago
by
ggerganov
Is it possible to use fine tuning on this model?
1
#131 opened 11 months ago
by
Jameslxz11
assistantfinal, analysis keyword is contained in the huggingface gpt-oss-120 output. Is this intended?
👍 4
4
#130 opened 11 months ago
by
ml345
Rename README.md to làm đẹp đoạn code của tôi được không ? tôi sẽ dán vào đây
#128 opened 11 months ago
by
tranvanbest
How to deploy gpt oss 120B in Openshift AI platform
👍 1
2
#126 opened 11 months ago
by
eselvam
how to run gpt-oss-120b by ollama using multi-gpu
1
#125 opened 11 months ago
by
ssfyasuo
Is this demo powered by hugging face?
🤗👍 1
2
#124 opened 11 months ago
by
terobox
Very bad censorship
👍 2
2
#123 opened 12 months ago
by
YesIamKurt
how to exclude file in "original" folder while model download
7
#122 opened 12 months ago
by
meetzuber
gpt-oss-120b works with OpenRouter + MCP servers, but not with locally hosted setup via LibreChat
➕ 2
#121 opened 12 months ago
by
Byrdi