Text Generation
Transformers
TensorBoard
Safetensors
qwen2
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use ChenDRAG/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 ChenDRAG/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="ChenDRAG/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("ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill") model = AutoModelForCausalLM.from_pretrained("ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill") 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 ChenDRAG/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 "ChenDRAG/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": "ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill
- SGLang
How to use ChenDRAG/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 "ChenDRAG/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": "ChenDRAG/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 "ChenDRAG/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": "ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill with Docker Model Runner:
docker model run hf.co/ChenDRAG/Qwen2.5-1.5B-Open-R1-Distill
Model save
Browse files- README.md +2 -2
- all_results.json +7 -6
- model.safetensors +1 -1
- tokenizer.json +2 -2
- train_results.json +7 -6
- trainer_state.json +15 -17
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -27,14 +27,14 @@ print(output["generated_text"])
|
|
| 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/noteam2235/huggingface/runs/
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with SFT.
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
-
- TRL: 0.
|
| 38 |
- Transformers: 4.49.0.dev0
|
| 39 |
- Pytorch: 2.5.1
|
| 40 |
- Datasets: 3.3.0
|
|
|
|
| 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/noteam2235/huggingface/runs/0rzfbsdx)
|
| 31 |
|
| 32 |
|
| 33 |
This model was trained with SFT.
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
+
- TRL: 0.14.0
|
| 38 |
- Transformers: 4.49.0.dev0
|
| 39 |
- Pytorch: 2.5.1
|
| 40 |
- Datasets: 3.3.0
|
all_results.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
|
|
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"total_flos": 1713227169792.0,
|
| 4 |
+
"train_loss": 0.8339962363243103,
|
| 5 |
+
"train_runtime": 79.6006,
|
| 6 |
+
"train_samples": 512,
|
| 7 |
+
"train_samples_per_second": 6.432,
|
| 8 |
+
"train_steps_per_second": 0.101
|
| 9 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3087467144
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91e0928e844a28ce46c96756c86abe3dd4866b9e10eeb84b47b40de7ebd7a00e
|
| 3 |
size 3087467144
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:83396048d512ec1f3178af0d7c1f79a226bba041822614b0e26a4fd2d4b55bf7
|
| 3 |
+
size 11421995
|
train_results.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
|
|
|
| 8 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"total_flos": 1713227169792.0,
|
| 4 |
+
"train_loss": 0.8339962363243103,
|
| 5 |
+
"train_runtime": 79.6006,
|
| 6 |
+
"train_samples": 512,
|
| 7 |
+
"train_samples_per_second": 6.432,
|
| 8 |
+
"train_steps_per_second": 0.101
|
| 9 |
}
|
trainer_state.json
CHANGED
|
@@ -1,34 +1,32 @@
|
|
| 1 |
{
|
| 2 |
"best_metric": null,
|
| 3 |
"best_model_checkpoint": null,
|
| 4 |
-
"epoch":
|
| 5 |
"eval_steps": 100,
|
| 6 |
-
"global_step":
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
-
"epoch": 0.
|
| 13 |
-
"grad_norm": 1.
|
| 14 |
-
"learning_rate":
|
| 15 |
-
"loss": 0.
|
| 16 |
-
"mean_token_accuracy": 0.7577449153561558,
|
| 17 |
"step": 5
|
| 18 |
},
|
| 19 |
{
|
| 20 |
-
"epoch":
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"train_steps_per_second": 0.115
|
| 28 |
}
|
| 29 |
],
|
| 30 |
"logging_steps": 5,
|
| 31 |
-
"max_steps":
|
| 32 |
"num_input_tokens_seen": 0,
|
| 33 |
"num_train_epochs": 1,
|
| 34 |
"save_steps": 500,
|
|
@@ -44,7 +42,7 @@
|
|
| 44 |
"attributes": {}
|
| 45 |
}
|
| 46 |
},
|
| 47 |
-
"total_flos":
|
| 48 |
"train_batch_size": 2,
|
| 49 |
"trial_name": null,
|
| 50 |
"trial_params": null
|
|
|
|
| 1 |
{
|
| 2 |
"best_metric": null,
|
| 3 |
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 1.0,
|
| 5 |
"eval_steps": 100,
|
| 6 |
+
"global_step": 8,
|
| 7 |
"is_hyper_param_search": false,
|
| 8 |
"is_local_process_zero": true,
|
| 9 |
"is_world_process_zero": true,
|
| 10 |
"log_history": [
|
| 11 |
{
|
| 12 |
+
"epoch": 0.625,
|
| 13 |
+
"grad_norm": 1.2765480627259704,
|
| 14 |
+
"learning_rate": 7.774790660436857e-06,
|
| 15 |
+
"loss": 0.846,
|
|
|
|
| 16 |
"step": 5
|
| 17 |
},
|
| 18 |
{
|
| 19 |
+
"epoch": 1.0,
|
| 20 |
+
"step": 8,
|
| 21 |
+
"total_flos": 1713227169792.0,
|
| 22 |
+
"train_loss": 0.8339962363243103,
|
| 23 |
+
"train_runtime": 79.6006,
|
| 24 |
+
"train_samples_per_second": 6.432,
|
| 25 |
+
"train_steps_per_second": 0.101
|
|
|
|
| 26 |
}
|
| 27 |
],
|
| 28 |
"logging_steps": 5,
|
| 29 |
+
"max_steps": 8,
|
| 30 |
"num_input_tokens_seen": 0,
|
| 31 |
"num_train_epochs": 1,
|
| 32 |
"save_steps": 500,
|
|
|
|
| 42 |
"attributes": {}
|
| 43 |
}
|
| 44 |
},
|
| 45 |
+
"total_flos": 1713227169792.0,
|
| 46 |
"train_batch_size": 2,
|
| 47 |
"trial_name": null,
|
| 48 |
"trial_params": null
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7416
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e2b8214a009a973ecaf8845b622ee7cda8a7f25278a76831680805084cf5721
|
| 3 |
size 7416
|