theworker02/open-reason
Viewer • Updated • 12.4k • 57 • 1
How to use theworker02/open-reason-xl with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="theworker02/open-reason-xl") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("theworker02/open-reason-xl")
model = AutoModelForCausalLM.from_pretrained("theworker02/open-reason-xl", device_map="auto")How to use theworker02/open-reason-xl with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "theworker02/open-reason-xl"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "theworker02/open-reason-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/theworker02/open-reason-xl
How to use theworker02/open-reason-xl with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "theworker02/open-reason-xl" \
--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": "theworker02/open-reason-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "theworker02/open-reason-xl" \
--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": "theworker02/open-reason-xl",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use theworker02/open-reason-xl with Docker Model Runner:
docker model run hf.co/theworker02/open-reason-xl
GPT-2-style causal LM trained from scratch on the Open Reason SFT split.
Exact parameter count: 443,719,680. This is not a 1B model and is not
theworker02/open-reason-1b.
sum(p.numel() for p in model.parameters()))torch: 2.12.0+cpu; cuda_available=False; Docker not installedtheworker02/open-reason pipeline 1.4.0data/release/all.jsonl)Related checkpoints (none of these is a 1B model):
No Reddit sources. Project license Apache-2.0.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("theworker02/open-reason-xl")
model = AutoModelForCausalLM.from_pretrained("theworker02/open-reason-xl")