Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
grpo
conversational
text-generation-inference
Instructions to use Yukang/Qwen2.5-3B-Open-R1-Code-GRPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yukang/Qwen2.5-3B-Open-R1-Code-GRPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yukang/Qwen2.5-3B-Open-R1-Code-GRPO") 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("Yukang/Qwen2.5-3B-Open-R1-Code-GRPO") model = AutoModelForCausalLM.from_pretrained("Yukang/Qwen2.5-3B-Open-R1-Code-GRPO", 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 Yukang/Qwen2.5-3B-Open-R1-Code-GRPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Yukang/Qwen2.5-3B-Open-R1-Code-GRPO
- SGLang
How to use Yukang/Qwen2.5-3B-Open-R1-Code-GRPO 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 "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO" \ --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": "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO", "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 "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO" \ --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": "Yukang/Qwen2.5-3B-Open-R1-Code-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Yukang/Qwen2.5-3B-Open-R1-Code-GRPO with Docker Model Runner:
docker model run hf.co/Yukang/Qwen2.5-3B-Open-R1-Code-GRPO
Commit History
-
End of training
Verified signatureae27700 -
Model save
Verified signature643d511 -
Training in progress, step 510
Verified signaturef2765ac -
End of training
Verified signaturea840137 -
Model save
Verified signatured9be6c6 -
Training in progress, step 510
Verified signature4650de5 -
End of training
Verified signature5af89b8 -
Model save
Verified signature0c242ce -
Training in progress, step 510
Verified signature0cddd0d -
End of training
Verified signature197293d -
Model save
Verified signaturec4f2730 -
Training in progress, step 509
Verified signature688c717 -
End of training
Verified signature0604e57 -
Model save
Verified signature80cf234 -
End of training
Verified signaturea047c3d -
End of training
Verified signature535070d -
Training in progress, step 509
Verified signature58b82f6 -
Model save
Verified signature2ebcfd8 -
Model save
Verified signature614c331 -
Training in progress, step 509
Verified signature1fadeb3 -
Training in progress, step 508
Verified signaturef851b61 -
End of training
Verified signatured3f631e -
Model save
Verified signature761a9a9 -
Training in progress, step 508
Verified signature832e425 -
End of training
Verified signature0a71eaf -
Model save
Verified signature799ead5 -
End of training
Verified signature00f6eed -
Model save
Verified signature5c3e3ba -
Training in progress, step 508
Verified signaturef0f8aa0 -
Training in progress, step 507
Verified signature7456cc7 -
End of training
Verified signature788b290 -
Model save
Verified signaturead20fc0 -
Training in progress, step 507
Verified signature3318edf -
End of training
Verified signature2243530 -
Model save
Verified signature533ecf1 -
Training in progress, step 507
Verified signature586967e -
End of training
Verified signaturebf092bc -
End of training
Verified signaturef6e28c2 -
Model save
Verified signatureef44ae4 -
Model save
Verified signature645df2c -
Training in progress, step 506
Verified signature13d5340 -
Training in progress, step 510
Verified signaturebc9dd33 -
End of training
Verified signature743a763 -
Model save
Verified signature81561f1 -
Training in progress, step 506
Verified signaturea8b9cf7 -
End of training
Verified signature452122e -
Model save
Verified signature92a1beb -
End of training
Verified signature70648b7 -
Training in progress, step 506
Verified signature014e12a -
Model save
Verified signature8543b94