Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use edbeeching/OpenR1-Distill-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use edbeeching/OpenR1-Distill-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="edbeeching/OpenR1-Distill-7B") 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("edbeeching/OpenR1-Distill-7B") model = AutoModelForCausalLM.from_pretrained("edbeeching/OpenR1-Distill-7B", 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 edbeeching/OpenR1-Distill-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "edbeeching/OpenR1-Distill-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "edbeeching/OpenR1-Distill-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/edbeeching/OpenR1-Distill-7B
- SGLang
How to use edbeeching/OpenR1-Distill-7B 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 "edbeeching/OpenR1-Distill-7B" \ --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": "edbeeching/OpenR1-Distill-7B", "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 "edbeeching/OpenR1-Distill-7B" \ --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": "edbeeching/OpenR1-Distill-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use edbeeching/OpenR1-Distill-7B with Docker Model Runner:
docker model run hf.co/edbeeching/OpenR1-Distill-7B
Commit History
-
Training in progress, epoch 3
Verified signatureba69e47 -
Training in progress, epoch 1
Verified signature7110a41
-
Training in progress, epoch 1
Verified signature3006a77 -
Training in progress, epoch 1
Verified signature53ecdb0 -
Training in progress, epoch 1
Verified signaturec141387
-
End of training
Verified signature588f655 -
Model save
Verified signatureb30f099 -
Training in progress, epoch 4
Verified signaturea8cbc9a -
End of training
Verified signaturebd32b15 -
Model save
Verified signaturef00f594 -
Training in progress, epoch 4
Verified signatureb066505 -
Training in progress, epoch 4
Verified signature13b69d9 -
Training in progress, epoch 4
Verified signatureaa1a797
-
Training in progress, epoch 3
Verified signaturea207368 -
Training in progress, epoch 3
Verified signatureee0cbc9
-
Training in progress, epoch 2
Verified signaturea60f143 -
Training in progress, epoch 2
Verified signature9750be3 -
Training in progress, epoch 1
Verified signaturefef17d4 -
Training in progress, epoch 1
Verified signature3670ba4
-
initial commit
Verified signaturec5f259e