Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
open-r1
trl
sft
conversational
text-generation-inference
Instructions to use pengxiang/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 pengxiang/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="pengxiang/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("pengxiang/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("pengxiang/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 pengxiang/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 "pengxiang/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": "pengxiang/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pengxiang/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use pengxiang/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 "pengxiang/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": "pengxiang/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 "pengxiang/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": "pengxiang/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pengxiang/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/pengxiang/Qwen2.5-1.5B-Open-R1-Distill
Model save
Browse files- README.md +2 -4
- all_results.json +4 -4
- config.json +1 -1
- train_results.json +4 -4
- trainer_state.json +4 -4
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 3 |
-
datasets: open-r1/OpenR1-Math-220k
|
| 4 |
library_name: transformers
|
| 5 |
model_name: Qwen2.5-1.5B-Open-R1-Distill
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- open-r1
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
licence: license
|
|
@@ -13,7 +11,7 @@ licence: license
|
|
| 13 |
|
| 14 |
# Model Card for Qwen2.5-1.5B-Open-R1-Distill
|
| 15 |
|
| 16 |
-
This model is a fine-tuned version of [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
|
@@ -29,7 +27,7 @@ print(output["generated_text"])
|
|
| 29 |
|
| 30 |
## Training procedure
|
| 31 |
|
| 32 |
-
[<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/iiau_video/huggingface/runs/
|
| 33 |
|
| 34 |
|
| 35 |
This model was trained with SFT.
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: Qwen2.5-1.5B-Open-R1-Distill
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
licence: license
|
|
|
|
| 11 |
|
| 12 |
# Model Card for Qwen2.5-1.5B-Open-R1-Distill
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct).
|
| 15 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
## Quick start
|
|
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
[<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/iiau_video/huggingface/runs/l0aaow3u)
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with SFT.
|
all_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 1.0370150057822388e+19,
|
| 3 |
-
"train_loss": 0.
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93733,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 1.0370150057822388e+19,
|
| 3 |
+
"train_loss": 0.0,
|
| 4 |
+
"train_runtime": 2.5915,
|
| 5 |
"train_samples": 93733,
|
| 6 |
+
"train_samples_per_second": 36169.037,
|
| 7 |
+
"train_steps_per_second": 565.304
|
| 8 |
}
|
config.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"tie_word_embeddings": true,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.52.0.dev0",
|
| 26 |
-
"use_cache":
|
| 27 |
"use_sliding_window": false,
|
| 28 |
"vocab_size": 151936
|
| 29 |
}
|
|
|
|
| 23 |
"tie_word_embeddings": true,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.52.0.dev0",
|
| 26 |
+
"use_cache": false,
|
| 27 |
"use_sliding_window": false,
|
| 28 |
"vocab_size": 151936
|
| 29 |
}
|
train_results.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"total_flos": 1.0370150057822388e+19,
|
| 3 |
-
"train_loss": 0.
|
| 4 |
-
"train_runtime":
|
| 5 |
"train_samples": 93733,
|
| 6 |
-
"train_samples_per_second":
|
| 7 |
-
"train_steps_per_second":
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"total_flos": 1.0370150057822388e+19,
|
| 3 |
+
"train_loss": 0.0,
|
| 4 |
+
"train_runtime": 2.5915,
|
| 5 |
"train_samples": 93733,
|
| 6 |
+
"train_samples_per_second": 36169.037,
|
| 7 |
+
"train_steps_per_second": 565.304
|
| 8 |
}
|
trainer_state.json
CHANGED
|
@@ -11733,10 +11733,10 @@
|
|
| 11733 |
"epoch": 1.0,
|
| 11734 |
"step": 1465,
|
| 11735 |
"total_flos": 1.0370150057822388e+19,
|
| 11736 |
-
"train_loss": 0.
|
| 11737 |
-
"train_runtime":
|
| 11738 |
-
"train_samples_per_second":
|
| 11739 |
-
"train_steps_per_second":
|
| 11740 |
}
|
| 11741 |
],
|
| 11742 |
"logging_steps": 1,
|
|
|
|
| 11733 |
"epoch": 1.0,
|
| 11734 |
"step": 1465,
|
| 11735 |
"total_flos": 1.0370150057822388e+19,
|
| 11736 |
+
"train_loss": 0.0,
|
| 11737 |
+
"train_runtime": 2.5915,
|
| 11738 |
+
"train_samples_per_second": 36169.037,
|
| 11739 |
+
"train_steps_per_second": 565.304
|
| 11740 |
}
|
| 11741 |
],
|
| 11742 |
"logging_steps": 1,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6008
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0d0e995bd8252a9839f548e4b5420d6961c5240f0ea8077008758e49e7c8111
|
| 3 |
size 6008
|