Jo1uck commited on
Commit
36a5893
·
verified ·
1 Parent(s): 3a2982e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -3
README.md CHANGED
@@ -1,3 +1,101 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ library_name: transformers
5
+ tags:
6
+ - vllm
7
+ ---
8
+
9
+
10
+ <!-- <p align="center">
11
+ <a href="https://gpt-oss.com"><strong>Try gpt-oss</strong></a> ·
12
+ <a href="https://cookbook.openai.com/topic/gpt-oss"><strong>Guides</strong></a> ·
13
+ <a href="https://arxiv.org/abs/2508.10925"><strong>Model card</strong></a> ·
14
+ <a href="https://openai.com/index/introducing-gpt-oss/"><strong>OpenAI blog</strong></a>
15
+ </p> -->
16
+
17
+ <br>
18
+
19
+ | Tasks | Metric | gpt-oss-20b | **gpt-oss-46b** | Improvement |
20
+ | :--- | :--- | :---: | :---: | :---: |
21
+ | **GSM8K** (0-shot) | Exact Match (flexible) | 0.1638 | **0.2290** | <font color="green">+39.8%</font> |
22
+ | **LAMBADA** (OpenAI) | Accuracy | **0.2668** | 0.2038 | <font color="red">-23.6%</font> |
23
+
24
+
25
+ > [!NOTE]
26
+ > This model card is dedicated to the medium `gpt-oss-46b` model. Check out [`gpt-oss-20b`](https://huggingface.co/openai/gpt-oss-20b) for the smaller model. Check out [`gpt-oss-120b`](https://huggingface.co/openai/gpt-oss-120b) for the larger model.
27
+
28
+
29
+ # Inference examples
30
+
31
+ ## Transformers
32
+
33
+ You can use `gpt-oss` with Transformers. If you use the Transformers chat template, it will automatically apply the [harmony response format](https://github.com/openai/harmony). If you use `model.generate` directly, you need to apply the harmony format manually using the chat template or use our [openai-harmony](https://github.com/openai/harmony) package.
34
+
35
+ To get started, install the necessary dependencies to setup your environment:
36
+
37
+ ```
38
+ pip install -U transformers kernels torch
39
+ ```
40
+
41
+ Once, setup you can proceed to run the model by running the snippet below:
42
+
43
+ ```py
44
+ from transformers import pipeline
45
+ import torch
46
+
47
+ model_id = "Jo1uck/gpt-oss-46b"
48
+
49
+ pipe = pipeline(
50
+ "text-generation",
51
+ model=model_id,
52
+ torch_dtype="auto",
53
+ device_map="auto",
54
+ )
55
+
56
+ messages = [
57
+ {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
58
+ ]
59
+
60
+ outputs = pipe(
61
+ messages,
62
+ max_new_tokens=256,
63
+ )
64
+ print(outputs[0]["generated_text"][-1])
65
+ ```
66
+
67
+ Alternatively, you can run the model via [`Transformers Serve`](https://huggingface.co/docs/transformers/main/serving) to spin up a OpenAI-compatible webserver:
68
+
69
+ ```
70
+ transformers serve
71
+ transformers chat localhost:8000 --model-name-or-path Jo1uck/gpt-oss-46b
72
+ ```
73
+
74
+ [Learn more about how to use gpt-oss with Transformers.](https://cookbook.openai.com/articles/gpt-oss/run-transformers)
75
+
76
+ ## vLLM
77
+
78
+ vLLM recommends using [uv](https://docs.astral.sh/uv/) for Python dependency management. You can use vLLM to spin up an OpenAI-compatible webserver. The following command will automatically download the model and start the server.
79
+
80
+ ```bash
81
+ uv pip install --pre vllm==0.10.1+gptoss \
82
+ --extra-index-url https://wheels.vllm.ai/gpt-oss/ \
83
+ --extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
84
+ --index-strategy unsafe-best-match
85
+
86
+ vllm serve Jo1uck/gpt-oss-46b
87
+ ```
88
+
89
+ [Learn more about how to use gpt-oss with vLLM.](https://cookbook.openai.com/articles/gpt-oss/run-vllm)
90
+
91
+
92
+ # Highlights
93
+
94
+ * **Permissive Apache 2.0 license:** Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment.
95
+ * **Configurable reasoning effort:** Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs.
96
+ * **Full chain-of-thought:** Gain complete access to the model’s reasoning process, facilitating easier debugging and increased trust in outputs. It’s not intended to be shown to end users.
97
+ * **Fine-tunable:** Fully customize models to your specific use case through parameter fine-tuning.
98
+ * **Agentic capabilities:** Use the models’ native capabilities for function calling, [web browsing](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#browser), [Python code execution](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#python), and Structured Outputs.
99
+ * **MXFP4 quantization:** The models were post-trained with MXFP4 quantization of the MoE weights, making `gpt-oss-120b` run on a single 80GB GPU (like NVIDIA H100 or AMD MI300X) and the `gpt-oss-46b` model run within 16GB of memory. All evals were performed with the same MXFP4 quantization.
100
+
101
+ ---