Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use leehh/Qwen2.5-1.5B-Open-R1-Distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leehh/Qwen2.5-1.5B-Open-R1-Distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leehh/Qwen2.5-1.5B-Open-R1-Distill") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("leehh/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("leehh/Qwen2.5-1.5B-Open-R1-Distill", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use leehh/Qwen2.5-1.5B-Open-R1-Distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leehh/Qwen2.5-1.5B-Open-R1-Distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leehh/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leehh/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use leehh/Qwen2.5-1.5B-Open-R1-Distill 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 "leehh/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "leehh/Qwen2.5-1.5B-Open-R1-Distill", "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 "leehh/Qwen2.5-1.5B-Open-R1-Distill" \ --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": "leehh/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use leehh/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/leehh/Qwen2.5-1.5B-Open-R1-Distill
Model save
Browse files- README.md +1 -1
- all_results.json +3 -3
- train_results.json +3 -3
- trainer_state.json +3 -3
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -26,7 +26,7 @@ print(output["generated_text"])
|
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/q962315998-sichuan-uuuup-science-technology-co-/huggingface/runs/
|
| 30 |
|
| 31 |
|
| 32 |
This model was trained with SFT.
|
|
|
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/q962315998-sichuan-uuuup-science-technology-co-/huggingface/runs/3wxqrh87)
|
| 30 |
|
| 31 |
|
| 32 |
This model was trained with SFT.
|
all_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 486636766648320.0,
|
| 3 |
"train_loss": 0.0,
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93733,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 486636766648320.0,
|
| 3 |
"train_loss": 0.0,
|
| 4 |
+
"train_runtime": 5.536,
|
| 5 |
"train_samples": 93733,
|
| 6 |
+
"train_samples_per_second": 16931.445,
|
| 7 |
+
"train_steps_per_second": 16931.445
|
| 8 |
}
|
train_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 486636766648320.0,
|
| 3 |
"train_loss": 0.0,
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93733,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 486636766648320.0,
|
| 3 |
"train_loss": 0.0,
|
| 4 |
+
"train_runtime": 5.536,
|
| 5 |
"train_samples": 93733,
|
| 6 |
+
"train_samples_per_second": 16931.445,
|
| 7 |
+
"train_steps_per_second": 16931.445
|
| 8 |
}
|
trainer_state.json
CHANGED
|
@@ -149982,9 +149982,9 @@
|
|
| 149982 |
"step": 93733,
|
| 149983 |
"total_flos": 486636766648320.0,
|
| 149984 |
"train_loss": 0.0,
|
| 149985 |
-
"train_runtime":
|
| 149986 |
-
"train_samples_per_second":
|
| 149987 |
-
"train_steps_per_second":
|
| 149988 |
}
|
| 149989 |
],
|
| 149990 |
"logging_steps": 5,
|
|
|
|
| 149982 |
"step": 93733,
|
| 149983 |
"total_flos": 486636766648320.0,
|
| 149984 |
"train_loss": 0.0,
|
| 149985 |
+
"train_runtime": 5.536,
|
| 149986 |
+
"train_samples_per_second": 16931.445,
|
| 149987 |
+
"train_steps_per_second": 16931.445
|
| 149988 |
}
|
| 149989 |
],
|
| 149990 |
"logging_steps": 5,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7480
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ae6870539d3c2bcb5b97f73b6b1ca2c5e623e7eac954a38005035b972dd88224
|
| 3 |
size 7480
|