Views
No views yet


gpt-oss-120b — for production, general purpose, high reasoning use cases that fit into a single 80GB GPU (like NVIDIA H100 or AMD MI300X) (117B parameters with 5.1B active parameters)gpt-oss-20b — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters)[!NOTE] This model card is dedicated to the smallergpt-oss-20bmodel. Check outgpt-oss-120bfor the larger model.
gpt-oss-120b run on a single 80GB GPU (like NVIDIA H100 or AMD MI300X) and the gpt-oss-20b model run within 16GB of memory. All evals were performed with the same MXFP4 quantization.1uv pip install --pre vllm==0.10.1+gptoss \
2 --extra-index-url https://wheels.vllm.ai/gpt-oss/ \
3 --extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
4 --index-strategy unsafe-best-match
5
6vllm serve RedHatAI/gpt-oss-20b1podman run --rm -it --device nvidia.com/gpu=all -p 8000:8000 \
2 --ipc=host \
3--env "HUGGING_FACE_HUB_TOKEN=$HF_TOKEN" \
4--env "HF_HUB_OFFLINE=0" -v ~/.cache/vllm:/home/vllm/.cache \
5--name=vllm \
6registry.access.redhat.com/rhaiis/rh-vllm-cuda \
7vllm serve \
8--tensor-parallel-size 8 \
9--max-model-len 32768 \
10--enforce-eager --model RedHatAI/gpt-oss-20b1# Setting up vllm server with ServingRuntime
2# Save as: vllm-servingruntime.yaml
3apiVersion: serving.kserve.io/v1alpha1
4kind: ServingRuntime
5metadata:
6 name: vllm-cuda-runtime # OPTIONAL CHANGE: set a unique name
7 annotations:
8 openshift.io/display-name: vLLM NVIDIA GPU ServingRuntime for KServe
9 opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]'
10 labels:
11 opendatahub.io/dashboard: 'true'
12spec:
13 annotations:
14 prometheus.io/port: '8080'
15 prometheus.io/path: '/metrics'
16 multiModel: false
17 supportedModelFormats:
18 - autoSelect: true
19 name: vLLM
20 containers:
21 - name: kserve-container
22 image: quay.io/modh/vllm:rhoai-2.25-cuda # CHANGE if needed. If AMD: quay.io/modh/vllm:rhoai-2.25-rocm
23 command:
24 - python
25 - -m
26 - vllm.entrypoints.openai.api_server
27 args:
28 - "--port=8080"
29 - "--model=/mnt/models"
30 - "--served-model-name={{.Name}}"
31 env:
32 - name: HF_HOME
33 value: /tmp/hf_home
34 ports:
35 - containerPort: 8080
36 protocol: TCP1# Attach model to vllm server. This is an NVIDIA template
2# Save as: inferenceservice.yaml
3apiVersion: serving.kserve.io/v1beta1
4kind: InferenceService
5metadata:
6 annotations:
7 openshift.io/display-name: gpt-oss-20b # OPTIONAL CHANGE
8 serving.kserve.io/deploymentMode: RawDeployment
9 name: gpt-oss-20b # specify model name. This value will be used to invoke the model in the payload
10 labels:
11 opendatahub.io/dashboard: 'true'
12spec:
13 predictor:
14 maxReplicas: 1
15 minReplicas: 1
16 model:
17 modelFormat:
18 name: vLLM
19 name: ''
20 resources:
21 limits:
22 cpu: '2' # this is model specific
23 memory: 8Gi # this is model specific
24 nvidia.com/gpu: '1' # this is accelerator specific
25 requests: # same comment for this block
26 cpu: '1'
27 memory: 4Gi
28 nvidia.com/gpu: '1'
29 runtime: vllm-cuda-runtime # must match the ServingRuntime name above
30 storageUri: oci://registry.redhat.io/rhelai1/modelcar-gpt-oss-20b:1.5
31 tolerations:
32 - effect: NoSchedule
33 key: nvidia.com/gpu
34 operator: Exists1# make sure first to be in the project where you want to deploy the model
2# oc project <project-name>
3
4# apply both resources to run model
5
6# Apply the ServingRuntime
7oc apply -f vllm-servingruntime.yaml
81# Replace <inference-service-name> and <cluster-ingress-domain> below:
2# - Run `oc get inferenceservice` to find your URL if unsure.
3
4# Call the server using curl:
5curl https://<inference-service-name>-predictor-default.<domain>/v1/chat/completions
6 -H "Content-Type: application/json" \
7 -d '{
8 "model": "gpt-oss-20b",
9 "stream": true,
10 "stream_options": {
11 "include_usage": true
12 },
13 "max_tokens": 1,
14 "messages": [
15 {
16 "role": "user",
17 "content": "How can a bee fly when its wings are so small?"
18 }
19 ]
20}'
21gpt-oss-120b and gpt-oss-20b with Transformers. If you use the Transformers chat template, it will automatically apply the harmony response format. If you use model.generate directly, you need to apply the harmony format manually using the chat template or use our openai-harmony package.pip install -U transformers kernels torch 1from transformers import pipeline
2import torch
3
4model_id = "openai/gpt-oss-20b"
5
6pipe = pipeline(
7 "text-generation",
8 model=model_id,
9 torch_dtype="auto",
10 device_map="auto",
11)
12
13messages = [
14 {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
15]
16
17outputs = pipe(
18 messages,
19 max_new_tokens=256,
20)
21print(outputs[0]["generated_text"][-1])Transformers Serve to spin up a OpenAI-compatible webserver:transformers serve
transformers chat localhost:8000 --model-name-or-path openai/gpt-oss-20b1# gpt-oss-20b
2ollama pull gpt-oss:20b
3ollama run gpt-oss:20b1# gpt-oss-20b
2lms get openai/gpt-oss-20b1# gpt-oss-20b
2huggingface-cli download openai/gpt-oss-20b --include "original/*" --local-dir gpt-oss-20b/
3pip install gpt-oss
4python -m gpt_oss.chat model/gpt-oss-20b can be fine-tuned on consumer hardware, whereas the larger gpt-oss-120b can be fine-tuned on a single H100 node.1@misc{openai2025gptoss120bgptoss20bmodel,
2 title={gpt-oss-120b & gpt-oss-20b Model Card},
3 author={OpenAI},
4 year={2025},
5 eprint={2508.10925},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2508.10925},
9}