Text Generation
Transformers
Safetensors
gpt_oss
Generated from Trainer
open-r1
trl
sft
conversational
Instructions to use HectorHe/gpt-oss-20b-math7k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HectorHe/gpt-oss-20b-math7k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HectorHe/gpt-oss-20b-math7k") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HectorHe/gpt-oss-20b-math7k") model = AutoModelForCausalLM.from_pretrained("HectorHe/gpt-oss-20b-math7k", 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 HectorHe/gpt-oss-20b-math7k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HectorHe/gpt-oss-20b-math7k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HectorHe/gpt-oss-20b-math7k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HectorHe/gpt-oss-20b-math7k
- SGLang
How to use HectorHe/gpt-oss-20b-math7k 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 "HectorHe/gpt-oss-20b-math7k" \ --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": "HectorHe/gpt-oss-20b-math7k", "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 "HectorHe/gpt-oss-20b-math7k" \ --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": "HectorHe/gpt-oss-20b-math7k", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HectorHe/gpt-oss-20b-math7k with Docker Model Runner:
docker model run hf.co/HectorHe/gpt-oss-20b-math7k
Training in progress, step 645
Browse files- model-00001-of-00009.safetensors +1 -1
- model-00002-of-00009.safetensors +1 -1
- model-00003-of-00009.safetensors +1 -1
- model-00004-of-00009.safetensors +1 -1
- model-00005-of-00009.safetensors +1 -1
- model-00006-of-00009.safetensors +1 -1
- model-00007-of-00009.safetensors +1 -1
- model-00008-of-00009.safetensors +1 -1
- model-00009-of-00009.safetensors +1 -1
model-00001-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4504304664
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21bef425b14b930234c8643aa98617ac3354fee5a9fb905dd2e1f5297f362be2
|
| 3 |
size 4504304664
|
model-00002-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127656
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f9cfe107a0143511c92715efd46233853b5217d6ad5b37f4b2342c2d2582a19
|
| 3 |
size 4939127656
|
model-00003-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127656
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f1d5689fcab52f1ab596e37c4f4ef659aec33fc6cbcceb08928c2592ad2ede76
|
| 3 |
size 4939127656
|
model-00004-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127680
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:087f605ed21361c761f5505a69f0a8539be7318ab592b656188d9e0d8a42def8
|
| 3 |
size 4939127680
|
model-00005-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62b2ff0b1351eca5fbbf4fcf9119231e55f116b55ef0d705637e2db385fdeebd
|
| 3 |
size 4939127704
|
model-00006-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:409c04c79637124481139f15e45d16c6affdf125fc089b0a147b4feeb73c729c
|
| 3 |
size 4939127704
|
model-00007-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb025fffb2095b81db3c586b5cf1640cbd1433eae0b0b8c0b43edfac8e8ddcf9
|
| 3 |
size 4939127704
|
model-00008-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4939127704
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98ccad8e471e4c9710742c4f072e14a55377171bae5354416ff389f6d1b6962a
|
| 3 |
size 4939127704
|
model-00009-of-00009.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2751362856
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:830c457450058f8d2658891cde51965214f4d80f0fd9b3b562a5ab473e024910
|
| 3 |
size 2751362856
|