Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
grpo
conversational
text-generation-inference
Instructions to use chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chansung/Qwen2.5-1.5B-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("chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO") model = AutoModelForCausalLM.from_pretrained("chansung/Qwen2.5-1.5B-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 chansung/Qwen2.5-1.5B-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 "chansung/Qwen2.5-1.5B-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": "chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO
- SGLang
How to use chansung/Qwen2.5-1.5B-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 "chansung/Qwen2.5-1.5B-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": "chansung/Qwen2.5-1.5B-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 "chansung/Qwen2.5-1.5B-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": "chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO with Docker Model Runner:
docker model run hf.co/chansung/Qwen2.5-1.5B-Open-R1-Code-GRPO
Commit History
-
Training in progress, step 450
Verified signature0caa328 -
Training in progress, step 400
Verified signatureff65a65 -
Training in progress, step 350
Verified signaturefeca5cb -
Training in progress, step 300
Verified signature5ffd86d -
Training in progress, step 250
Verified signature03dba1d -
Training in progress, step 200
Verified signatured0dd0e0 -
Training in progress, step 150
Verified signaturedb493bd -
Training in progress, step 100
Verified signatureedaeced -
Training in progress, step 50
Verified signature999eaf6
-
End of training
Verified signature082876a -
Model save
Verified signaturefeb3789 -
Training in progress, step 500
Verified signature24d338a -
Training in progress, step 450
Verified signature755b252 -
Training in progress, step 400
Verified signature462f64c -
Training in progress, step 350
Verified signature1893e04 -
Training in progress, step 300
Verified signature92afda2 -
Training in progress, step 250
Verified signature421cf11 -
Training in progress, step 200
Verified signatured52e8b7 -
Training in progress, step 150
Verified signature50f72a7 -
Training in progress, step 100
Verified signaturec716f55 -
Training in progress, step 50
Verified signaturef53fb7e
-
Training in progress, step 100
Verified signature6e517b9 -
Training in progress, step 50
Verified signature7ab0c2d -
Training in progress, step 400
Verified signature7a63ab0 -
Training in progress, step 350
Verified signaturea337cec -
Training in progress, step 300
Verified signature1eb45cc -
Training in progress, step 250
Verified signaturee30039b -
Training in progress, step 200
Verified signature3b3c4db
-
Training in progress, step 150
Verified signature33274d0 -
Training in progress, step 100
Verified signature6f5c3cf -
Training in progress, step 50
Verified signature0e33cbd
-
initial commit
Verified signaturef999f2a