Instructions to use Sytheticbot/Your-gpt-oss-20b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sytheticbot/Your-gpt-oss-20b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sytheticbot/Your-gpt-oss-20b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sytheticbot/Your-gpt-oss-20b") model = AutoModelForCausalLM.from_pretrained("Sytheticbot/Your-gpt-oss-20b", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sytheticbot/Your-gpt-oss-20b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sytheticbot/Your-gpt-oss-20b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sytheticbot/Your-gpt-oss-20b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sytheticbot/Your-gpt-oss-20b
- SGLang
How to use Sytheticbot/Your-gpt-oss-20b 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 "Sytheticbot/Your-gpt-oss-20b" \ --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": "Sytheticbot/Your-gpt-oss-20b", "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 "Sytheticbot/Your-gpt-oss-20b" \ --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": "Sytheticbot/Your-gpt-oss-20b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sytheticbot/Your-gpt-oss-20b with Docker Model Runner:
docker model run hf.co/Sytheticbot/Your-gpt-oss-20b
Update Your-gpt-oss-20b model card
Browse files
README.md
CHANGED
|
@@ -6,6 +6,25 @@ tags:
|
|
| 6 |
- vllm
|
| 7 |
---
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
<p align="center">
|
| 10 |
<img alt="gpt-oss-20b" src="https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg">
|
| 11 |
</p>
|
|
@@ -60,7 +79,7 @@ Once, setup you can proceed to run the model by running the snippet below:
|
|
| 60 |
from transformers import pipeline
|
| 61 |
import torch
|
| 62 |
|
| 63 |
-
model_id = "
|
| 64 |
|
| 65 |
pipe = pipeline(
|
| 66 |
"text-generation",
|
|
@@ -84,7 +103,7 @@ Alternatively, you can run the model via [`Transformers Serve`](https://huggingf
|
|
| 84 |
|
| 85 |
```
|
| 86 |
transformers serve
|
| 87 |
-
transformers chat localhost:8000 --model-name-or-path
|
| 88 |
```
|
| 89 |
|
| 90 |
[Learn more about how to use gpt-oss with Transformers.](https://cookbook.openai.com/articles/gpt-oss/run-transformers)
|
|
@@ -99,7 +118,7 @@ uv pip install --pre vllm==0.10.1+gptoss \
|
|
| 99 |
--extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
|
| 100 |
--index-strategy unsafe-best-match
|
| 101 |
|
| 102 |
-
vllm serve
|
| 103 |
```
|
| 104 |
|
| 105 |
[Learn more about how to use gpt-oss with vLLM.](https://cookbook.openai.com/articles/gpt-oss/run-vllm)
|
|
@@ -126,7 +145,7 @@ If you are using [LM Studio](https://lmstudio.ai/) you can use the following com
|
|
| 126 |
|
| 127 |
```bash
|
| 128 |
# gpt-oss-20b
|
| 129 |
-
lms get
|
| 130 |
```
|
| 131 |
|
| 132 |
Check out our [awesome list](https://github.com/openai/gpt-oss/blob/main/awesome-gpt-oss.md) for a broader collection of gpt-oss resources and inference partners.
|
|
@@ -139,7 +158,7 @@ You can download the model weights from the [Hugging Face Hub](https://huggingfa
|
|
| 139 |
|
| 140 |
```shell
|
| 141 |
# gpt-oss-20b
|
| 142 |
-
huggingface-cli download
|
| 143 |
pip install gpt-oss
|
| 144 |
python -m gpt_oss.chat model/
|
| 145 |
```
|
|
|
|
| 6 |
- vllm
|
| 7 |
---
|
| 8 |
|
| 9 |
+
# Your-gpt-oss-20b
|
| 10 |
+
|
| 11 |
+
This repository is a redistributed copy of the parent model [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b), renamed and packaged as `Sytheticbot/Your-gpt-oss-20b`.
|
| 12 |
+
|
| 13 |
+
Parent model: [`openai/gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b)
|
| 14 |
+
|
| 15 |
+
License: Apache-2.0, following the parent model license.
|
| 16 |
+
|
| 17 |
+
Use this fork with:
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
model_id = "Sytheticbot/Your-gpt-oss-20b"
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
The parent model card content is preserved below for attribution, usage instructions, evaluation notes, and citation details.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
|
| 28 |
<p align="center">
|
| 29 |
<img alt="gpt-oss-20b" src="https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg">
|
| 30 |
</p>
|
|
|
|
| 79 |
from transformers import pipeline
|
| 80 |
import torch
|
| 81 |
|
| 82 |
+
model_id = "Sytheticbot/Your-gpt-oss-20b"
|
| 83 |
|
| 84 |
pipe = pipeline(
|
| 85 |
"text-generation",
|
|
|
|
| 103 |
|
| 104 |
```
|
| 105 |
transformers serve
|
| 106 |
+
transformers chat localhost:8000 --model-name-or-path Sytheticbot/Your-gpt-oss-20b
|
| 107 |
```
|
| 108 |
|
| 109 |
[Learn more about how to use gpt-oss with Transformers.](https://cookbook.openai.com/articles/gpt-oss/run-transformers)
|
|
|
|
| 118 |
--extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
|
| 119 |
--index-strategy unsafe-best-match
|
| 120 |
|
| 121 |
+
vllm serve Sytheticbot/Your-gpt-oss-20b
|
| 122 |
```
|
| 123 |
|
| 124 |
[Learn more about how to use gpt-oss with vLLM.](https://cookbook.openai.com/articles/gpt-oss/run-vllm)
|
|
|
|
| 145 |
|
| 146 |
```bash
|
| 147 |
# gpt-oss-20b
|
| 148 |
+
lms get Sytheticbot/Your-gpt-oss-20b
|
| 149 |
```
|
| 150 |
|
| 151 |
Check out our [awesome list](https://github.com/openai/gpt-oss/blob/main/awesome-gpt-oss.md) for a broader collection of gpt-oss resources and inference partners.
|
|
|
|
| 158 |
|
| 159 |
```shell
|
| 160 |
# gpt-oss-20b
|
| 161 |
+
huggingface-cli download Sytheticbot/Your-gpt-oss-20b --include "original/*" --local-dir gpt-oss-20b/
|
| 162 |
pip install gpt-oss
|
| 163 |
python -m gpt_oss.chat model/
|
| 164 |
```
|