Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use hanxinyan/Qwen2.5-1.5B-Open-R1-Distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hanxinyan/Qwen2.5-1.5B-Open-R1-Distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hanxinyan/Qwen2.5-1.5B-Open-R1-Distill") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hanxinyan/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("hanxinyan/Qwen2.5-1.5B-Open-R1-Distill", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hanxinyan/Qwen2.5-1.5B-Open-R1-Distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hanxinyan/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use hanxinyan/Qwen2.5-1.5B-Open-R1-Distill 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 "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill", "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 "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "hanxinyan/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hanxinyan/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/hanxinyan/Qwen2.5-1.5B-Open-R1-Distill
Commit History
-
End of training
Verified signature64783df -
Model save
Verified signature2ba440e -
Training in progress, step 135
Verified signature3edb161 -
Training in progress, step 100
Verified signature57f802a
-
End of training
Verified signature8f2c2bb -
Model save
Verified signatureae5bbaf -
Training in progress, step 2199
Verified signature71f87d4 -
Training in progress, step 2100
Verified signature49501bf -
Training in progress, step 2000
Verified signaturef4193f1 -
Training in progress, step 1900
Verified signature9339d4c -
Training in progress, step 1800
Verified signature9380e9d -
Training in progress, step 1700
Verified signature90ac992 -
Training in progress, step 1600
Verified signatured44237f -
Training in progress, step 1500
Verified signature116dafa -
Training in progress, step 1400
Verified signature3726dce -
Training in progress, step 1300
Verified signature183da18 -
Training in progress, step 1200
Verified signaturefcf5abd -
Training in progress, step 1100
Verified signatureaa3e3a1 -
Training in progress, step 1000
Verified signaturef4c06a2 -
Training in progress, step 900
Verified signature8efd538 -
Training in progress, step 800
Verified signature380e2e3 -
Training in progress, step 700
Verified signature97dfac4 -
Training in progress, step 600
Verified signature11fade4 -
Training in progress, step 500
Verified signaturee0c05f2 -
Training in progress, step 400
Verified signature470e711 -
Training in progress, step 300
Verified signatureda8d9a0 -
Training in progress, step 200
Verified signature7c72bdc -
Training in progress, step 100
Verified signature3ab63dc -
Training in progress, step 3200
Verified signatureffa3d95 -
Training in progress, step 3100
Verified signature5a90769 -
Training in progress, step 3000
Verified signature7086503 -
Training in progress, step 2900
Verified signature6d4be35 -
Training in progress, step 2800
Verified signaturec4a77f4 -
Training in progress, step 2700
Verified signature505856a -
Training in progress, step 2600
Verified signature0accef3 -
Training in progress, step 2500
Verified signaturec9888a0 -
Training in progress, step 2400
Verified signature8db1666
-
Training in progress, step 2300
Verified signature5204ba5 -
Training in progress, step 2200
Verified signaturea2be6df -
Training in progress, step 2100
Verified signature633055f -
Training in progress, step 2000
Verified signatured49b4af -
Training in progress, step 1900
Verified signaturef198b5c -
Training in progress, step 1800
Verified signature58b9ae6 -
Training in progress, step 1700
Verified signature4e5098b -
Training in progress, step 1600
Verified signaturede2b64c -
Training in progress, step 1500
Verified signatureb572e35 -
Training in progress, step 1400
Verified signature7627c6b -
Training in progress, step 1300
Verified signature6d5918b -
Training in progress, step 1200
Verified signature4710359 -
Training in progress, step 1100
Verified signature29f6a5d