Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use mathczh/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 mathczh/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="mathczh/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("mathczh/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("mathczh/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 mathczh/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 "mathczh/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": "mathczh/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mathczh/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use mathczh/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 "mathczh/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": "mathczh/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 "mathczh/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": "mathczh/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mathczh/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/mathczh/Qwen2.5-1.5B-Open-R1-Distill
Commit History
-
End of training
Verified signaturebb46fa0 -
Model save
Verified signaturee09a49f -
Training in progress, step 21440
Verified signaturead1113b -
Training in progress, step 21400
Verified signature83ea130 -
Training in progress, step 21300
Verified signature7086237 -
Training in progress, step 21200
Verified signature23aa7fd -
Training in progress, step 21100
Verified signature6c78857 -
Training in progress, step 21000
Verified signature73137ec -
Training in progress, step 20900
Verified signaturede2d5e9 -
Training in progress, step 20800
Verified signature506728c -
Training in progress, step 20700
Verified signatureb6dbfd7 -
Training in progress, step 20600
Verified signaturedf980a2 -
Training in progress, step 20500
Verified signature6dad189 -
Training in progress, step 20400
Verified signaturedbcc43d -
Training in progress, step 20300
Verified signature460fc1b -
Training in progress, step 20200
Verified signatured5507ff -
Training in progress, step 20100
Verified signature68b9e63 -
Training in progress, step 20000
Verified signaturedcb3076 -
Training in progress, step 19900
Verified signature7e5728d -
Training in progress, step 19800
Verified signature7e5c23c -
Training in progress, step 19700
Verified signaturefae5a50 -
Training in progress, step 19600
Verified signature00f16a8 -
Training in progress, step 19500
Verified signature066f6de -
Training in progress, step 19400
Verified signature6ab4d2d -
Training in progress, step 19300
Verified signature30998cb -
Training in progress, step 19200
Verified signature4372074 -
Training in progress, step 19100
Verified signature9c3171b -
Training in progress, step 19000
Verified signature2b2faff -
Training in progress, step 18900
Verified signature091ea34 -
Training in progress, step 18800
Verified signaturef9e5354 -
Training in progress, step 18700
Verified signaturebc98249 -
Training in progress, step 18600
Verified signature871872b -
Training in progress, step 18500
Verified signature46b8ea9 -
Training in progress, step 18400
Verified signature34ec874 -
Training in progress, step 18300
Verified signaturee6640d0 -
Training in progress, step 18200
Verified signature4e472ac -
Training in progress, step 18100
Verified signature2d12a3d -
Training in progress, step 18000
Verified signature2f0bb7e -
Training in progress, step 17900
Verified signature5fa7cc8 -
Training in progress, step 17800
Verified signature28398d4 -
Training in progress, step 17700
Verified signature0fb9d16 -
Training in progress, step 17600
Verified signature6c54287 -
Training in progress, step 17500
Verified signaturec58a19a -
Training in progress, step 17400
Verified signature42b84d3 -
Training in progress, step 17300
Verified signature9e55e65 -
Training in progress, step 17200
Verified signaturef93bbd3 -
Training in progress, step 17100
Verified signature05c1a2a -
Training in progress, step 17000
Verified signature028b450 -
Training in progress, step 16900
Verified signature48322c7 -
Training in progress, step 16800
Verified signature1cce87c