Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code") 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("zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code") model = AutoModelForCausalLM.from_pretrained("zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code", 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 zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code
- SGLang
How to use zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code 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 "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code" \ --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": "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code", "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 "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code" \ --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": "zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code with Docker Model Runner:
docker model run hf.co/zyl2023/Qwen2.5-1.5B-Open-R1-Distill-code
Commit History
-
Improve language tag
Verified signatureHi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.24608b3
-
End of training
Verified signaturee02ce36 -
Model save
Verified signature3c5060c -
Training in progress, step 3160
Verified signaturea8b794b -
Training in progress, step 3100
Verified signature8833ac1 -
Training in progress, step 3000
Verified signaturea27fbe2 -
Training in progress, step 2900
Verified signaturef1cddf5 -
Training in progress, step 2800
Verified signature6b9fdcb -
Training in progress, step 2700
Verified signature82d22ea -
Training in progress, step 2600
Verified signaturec12085e -
Training in progress, step 2500
Verified signaturedbfa3aa -
Training in progress, step 2400
Verified signature4161d08 -
Training in progress, step 2300
Verified signature864a4d5 -
Training in progress, step 2200
Verified signature6fb90e2 -
Training in progress, step 2100
Verified signature7b4b958 -
Training in progress, step 2000
Verified signature670d31c -
Training in progress, step 1900
Verified signature3cb2b9e -
Training in progress, step 1800
Verified signatured15ae7d -
Training in progress, step 1700
Verified signature5f282a8 -
Training in progress, step 1600
Verified signature6aa72a6 -
Training in progress, step 1500
Verified signature6033671 -
Training in progress, step 1400
Verified signaturef0c5d1b -
Training in progress, step 1300
Verified signature5b383b3 -
Training in progress, step 1200
Verified signature033184b -
Training in progress, step 1100
Verified signaturee48bed4 -
Training in progress, step 1000
Verified signature0cc93be -
Training in progress, step 900
Verified signature353c43f -
Training in progress, step 800
Verified signatureb1a27df -
Training in progress, step 700
Verified signature59281ed -
Training in progress, step 600
Verified signature04e06ca -
Training in progress, step 500
Verified signature9d2ffb4 -
Training in progress, step 400
Verified signature7ad8d36 -
Training in progress, step 300
Verified signature8410277 -
Training in progress, step 200
Verified signature9a167f6 -
Training in progress, step 100
Verified signature04ed9a9 -
initial commit
Verified signature3881501