Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
grpo
conversational
text-generation-inference
Instructions to use qgallouedec/R1-Zero-Qwen-7B-Math with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qgallouedec/R1-Zero-Qwen-7B-Math with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="qgallouedec/R1-Zero-Qwen-7B-Math") 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("qgallouedec/R1-Zero-Qwen-7B-Math") model = AutoModelForCausalLM.from_pretrained("qgallouedec/R1-Zero-Qwen-7B-Math", 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 qgallouedec/R1-Zero-Qwen-7B-Math with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qgallouedec/R1-Zero-Qwen-7B-Math" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qgallouedec/R1-Zero-Qwen-7B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/qgallouedec/R1-Zero-Qwen-7B-Math
- SGLang
How to use qgallouedec/R1-Zero-Qwen-7B-Math 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 "qgallouedec/R1-Zero-Qwen-7B-Math" \ --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": "qgallouedec/R1-Zero-Qwen-7B-Math", "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 "qgallouedec/R1-Zero-Qwen-7B-Math" \ --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": "qgallouedec/R1-Zero-Qwen-7B-Math", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use qgallouedec/R1-Zero-Qwen-7B-Math with Docker Model Runner:
docker model run hf.co/qgallouedec/R1-Zero-Qwen-7B-Math
Commit History
-
End of training
Verified signature91eb70c -
Model save
Verified signatured82bf7e -
Training in progress, step 511
Verified signature14fc227 -
Training in progress, step 468
Verified signature457f2bb -
Training in progress, step 416
Verified signature846ef78 -
Training in progress, step 364
Verified signaturef66d26c -
Training in progress, step 312
Verified signatureea44866 -
Training in progress, step 260
Verified signature3e771ea -
Training in progress, step 208
Verified signatureac72d3a -
Training in progress, step 156
Verified signatured1cfab9 -
Training in progress, step 104
Verified signatureeb802b8 -
Training in progress, step 52
Verified signature2d32f6b
-
Training in progress, step 468
Verified signature5c25982 -
End of training
Verified signatureda76120 -
Model save
Verified signature0eff99d -
Training in progress, step 511
Verified signature45ed15a -
Training in progress, step 416
Verified signaturee652538 -
Training in progress, step 468
Verified signature6e7e2e6 -
Training in progress, step 364
Verified signature7f41a0c -
Training in progress, step 416
Verified signature3db0c44 -
Training in progress, step 312
Verified signaturecb68c8a -
Training in progress, step 364
Verified signatureebe6f91 -
Training in progress, step 260
Verified signaturebd2cfcb -
Training in progress, step 312
Verified signature16317b8 -
Training in progress, step 260
Verified signature6f467b9 -
Training in progress, step 208
Verified signature67c606b -
Training in progress, step 208
Verified signature4fdd0a1 -
Training in progress, step 156
Verified signaturea7eb8b2 -
Training in progress, step 156
Verified signaturef001a69 -
Training in progress, step 104
Verified signatured355591 -
Training in progress, step 104
Verified signaturef9f305b -
Training in progress, step 52
Verified signature3e16ccd -
Training in progress, step 52
Verified signaturee5c23c9
-
initial commit
Verified signature53b5f5b