Text Generation
Transformers
Safetensors
English
Chinese
qwen3
recommendation
generative-recommendation
reasoning
itemic-token
pretraining
text-generation-inference
Instructions to use OpenOneRec/OneReason-0.8B-pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenOneRec/OneReason-0.8B-pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenOneRec/OneReason-0.8B-pretrain")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("OpenOneRec/OneReason-0.8B-pretrain") model = AutoModelForMultimodalLM.from_pretrained("OpenOneRec/OneReason-0.8B-pretrain") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenOneRec/OneReason-0.8B-pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenOneRec/OneReason-0.8B-pretrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenOneRec/OneReason-0.8B-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenOneRec/OneReason-0.8B-pretrain
- SGLang
How to use OpenOneRec/OneReason-0.8B-pretrain 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 "OpenOneRec/OneReason-0.8B-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenOneRec/OneReason-0.8B-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "OpenOneRec/OneReason-0.8B-pretrain" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenOneRec/OneReason-0.8B-pretrain", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenOneRec/OneReason-0.8B-pretrain with Docker Model Runner:
docker model run hf.co/OpenOneRec/OneReason-0.8B-pretrain
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -216,7 +216,7 @@ print(tokenizer.decode(response_ids, skip_special_tokens=True))
|
|
| 216 |
Expected response:
|
| 217 |
|
| 218 |
```
|
| 219 |
-
|
| 220 |
```
|
| 221 |
|
| 222 |
### Itemic Pattern Grounding Example
|
|
@@ -289,11 +289,11 @@ Expected response (example output):
|
|
| 289 |
|
| 290 |
```
|
| 291 |
[
|
| 292 |
-
'<|video_begin|><
|
| 293 |
-
'<|video_begin|><
|
| 294 |
-
'<|video_begin|><
|
| 295 |
...
|
| 296 |
-
'<|video_begin|><
|
| 297 |
]
|
| 298 |
```
|
| 299 |
|
|
|
|
| 216 |
Expected response:
|
| 217 |
|
| 218 |
```
|
| 219 |
+
该商品是一款家居生活厨房小工具,一级类目是家居生活,二级类目是厨房小工具,三级类目是其他小工具。加厚食品级透明塑料材质,高透明度便于观察,耐高温无异味,可反复使用,适用于烘焙、饮品等场景。价格区间为5-10元。无品牌。
|
| 220 |
```
|
| 221 |
|
| 222 |
### Itemic Pattern Grounding Example
|
|
|
|
| 289 |
|
| 290 |
```
|
| 291 |
[
|
| 292 |
+
'<|video_begin|><s_a_3801><s_b_7498><s_c_853>',
|
| 293 |
+
'<|video_begin|><s_a_4615><s_b_4033><s_c_1014>',
|
| 294 |
+
'<|video_begin|><s_a_7385><s_b_800><s_c_4636>',
|
| 295 |
...
|
| 296 |
+
'<|video_begin|><s_a_4646><s_b_7261><s_c_853>'
|
| 297 |
]
|
| 298 |
```
|
| 299 |
|