Model save
Browse files- README.md +68 -0
- all_results.json +8 -0
- generation_config.json +9 -0
- train_results.json +8 -0
- trainer_state.json +230 -0
README.md
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: zijianh/DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-new
|
3 |
+
library_name: transformers
|
4 |
+
model_name: DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-medium-0_05-new
|
5 |
+
tags:
|
6 |
+
- generated_from_trainer
|
7 |
+
- trl
|
8 |
+
- grpo
|
9 |
+
licence: license
|
10 |
+
---
|
11 |
+
|
12 |
+
# Model Card for DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-medium-0_05-new
|
13 |
+
|
14 |
+
This model is a fine-tuned version of [zijianh/DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-new](https://huggingface.co/zijianh/DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-new).
|
15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
16 |
+
|
17 |
+
## Quick start
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
+
|
22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
23 |
+
generator = pipeline("text-generation", model="zijianh/DeepSeek-R1-Distill-Qwen-7B-RL-length-penalty-low-medium-0_05-new", device="cuda")
|
24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
25 |
+
print(output["generated_text"])
|
26 |
+
```
|
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/sota_mavens-university-of-michigan/huggingface/runs/xdifirou)
|
31 |
+
|
32 |
+
|
33 |
+
This model was trained with GRPO, a method introduced in [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://huggingface.co/papers/2402.03300).
|
34 |
+
|
35 |
+
### Framework versions
|
36 |
+
|
37 |
+
- TRL: 0.16.0.dev0
|
38 |
+
- Transformers: 4.49.0
|
39 |
+
- Pytorch: 2.5.1
|
40 |
+
- Datasets: 3.4.1
|
41 |
+
- Tokenizers: 0.21.1
|
42 |
+
|
43 |
+
## Citations
|
44 |
+
|
45 |
+
Cite GRPO as:
|
46 |
+
|
47 |
+
```bibtex
|
48 |
+
@article{zhihong2024deepseekmath,
|
49 |
+
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
|
50 |
+
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
|
51 |
+
year = 2024,
|
52 |
+
eprint = {arXiv:2402.03300},
|
53 |
+
}
|
54 |
+
|
55 |
+
```
|
56 |
+
|
57 |
+
Cite TRL as:
|
58 |
+
|
59 |
+
```bibtex
|
60 |
+
@misc{vonwerra2022trl,
|
61 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
62 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
|
63 |
+
year = 2020,
|
64 |
+
journal = {GitHub repository},
|
65 |
+
publisher = {GitHub},
|
66 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
67 |
+
}
|
68 |
+
```
|
all_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"total_flos": 0.0,
|
3 |
+
"train_loss": 0.1985041233229226,
|
4 |
+
"train_runtime": 18468.5879,
|
5 |
+
"train_samples": 7500,
|
6 |
+
"train_samples_per_second": 0.812,
|
7 |
+
"train_steps_per_second": 0.003
|
8 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 151646,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": 151643,
|
6 |
+
"temperature": 0.6,
|
7 |
+
"top_p": 0.95,
|
8 |
+
"transformers_version": "4.49.0"
|
9 |
+
}
|
train_results.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"total_flos": 0.0,
|
3 |
+
"train_loss": 0.1985041233229226,
|
4 |
+
"train_runtime": 18468.5879,
|
5 |
+
"train_samples": 7500,
|
6 |
+
"train_samples_per_second": 0.812,
|
7 |
+
"train_steps_per_second": 0.003
|
8 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 1.9872340425531916,
|
5 |
+
"eval_steps": 100,
|
6 |
+
"global_step": 58,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"clip_ratio": 0.0,
|
13 |
+
"completion_length": 973.0485916137695,
|
14 |
+
"epoch": 0.03404255319148936,
|
15 |
+
"grad_norm": 0.26080044292213134,
|
16 |
+
"kl": 0.0,
|
17 |
+
"learning_rate": 5e-07,
|
18 |
+
"loss": 0.1215,
|
19 |
+
"reward": 0.7184314727783203,
|
20 |
+
"reward_std": 0.15251445909962058,
|
21 |
+
"rewards/accuracy_reward": 0.7421875298023224,
|
22 |
+
"rewards/format_reward": 0.0,
|
23 |
+
"rewards/len_penalty": -0.02375606936402619,
|
24 |
+
"step": 1
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"clip_ratio": 0.0,
|
28 |
+
"completion_length": 975.6433238983154,
|
29 |
+
"epoch": 0.1702127659574468,
|
30 |
+
"grad_norm": 0.2057173239852816,
|
31 |
+
"kl": 7.790327072143555e-05,
|
32 |
+
"learning_rate": 2.5e-06,
|
33 |
+
"loss": 0.1143,
|
34 |
+
"reward": 0.7099975757300854,
|
35 |
+
"reward_std": 0.147755601326935,
|
36 |
+
"rewards/accuracy_reward": 0.7338169943541288,
|
37 |
+
"rewards/format_reward": 0.0,
|
38 |
+
"rewards/len_penalty": -0.02381941577186808,
|
39 |
+
"step": 5
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"clip_ratio": 0.0,
|
43 |
+
"completion_length": 866.1272705078125,
|
44 |
+
"epoch": 0.3404255319148936,
|
45 |
+
"grad_norm": 0.4006290505834594,
|
46 |
+
"kl": 0.005752372741699219,
|
47 |
+
"learning_rate": 2.956412726139078e-06,
|
48 |
+
"loss": 0.1039,
|
49 |
+
"reward": 0.7401266694068909,
|
50 |
+
"reward_std": 0.16346940137445926,
|
51 |
+
"rewards/accuracy_reward": 0.7612723588943482,
|
52 |
+
"rewards/format_reward": 0.0,
|
53 |
+
"rewards/len_penalty": -0.02114568497054279,
|
54 |
+
"step": 10
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"clip_ratio": 0.0,
|
58 |
+
"completion_length": 727.8928909301758,
|
59 |
+
"epoch": 0.5106382978723404,
|
60 |
+
"grad_norm": 0.789066138623355,
|
61 |
+
"kl": 0.174072265625,
|
62 |
+
"learning_rate": 2.7836719084521715e-06,
|
63 |
+
"loss": 0.1145,
|
64 |
+
"reward": 0.6513140380382538,
|
65 |
+
"reward_std": 0.1966270312666893,
|
66 |
+
"rewards/accuracy_reward": 0.6690848499536515,
|
67 |
+
"rewards/format_reward": 0.0,
|
68 |
+
"rewards/len_penalty": -0.017770822765305637,
|
69 |
+
"step": 15
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"clip_ratio": 0.0,
|
73 |
+
"completion_length": 573.2581741333008,
|
74 |
+
"epoch": 0.6808510638297872,
|
75 |
+
"grad_norm": 1.576084537592535,
|
76 |
+
"kl": 0.8208984375,
|
77 |
+
"learning_rate": 2.4946839873611927e-06,
|
78 |
+
"loss": 0.1556,
|
79 |
+
"reward": 0.585111603885889,
|
80 |
+
"reward_std": 0.22033293917775154,
|
81 |
+
"rewards/accuracy_reward": 0.5991071686148643,
|
82 |
+
"rewards/format_reward": 0.0,
|
83 |
+
"rewards/len_penalty": -0.013995561096817256,
|
84 |
+
"step": 20
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"clip_ratio": 0.0,
|
88 |
+
"completion_length": 543.6825035095214,
|
89 |
+
"epoch": 0.851063829787234,
|
90 |
+
"grad_norm": 2.632876303519198,
|
91 |
+
"kl": 2.15634765625,
|
92 |
+
"learning_rate": 2.1156192081791355e-06,
|
93 |
+
"loss": 0.3664,
|
94 |
+
"reward": 0.606927415728569,
|
95 |
+
"reward_std": 0.2152379907667637,
|
96 |
+
"rewards/accuracy_reward": 0.6202009156346321,
|
97 |
+
"rewards/format_reward": 0.0,
|
98 |
+
"rewards/len_penalty": -0.013273498858325183,
|
99 |
+
"step": 25
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"clip_ratio": 0.0,
|
103 |
+
"completion_length": 515.0230895996094,
|
104 |
+
"epoch": 1.0340425531914894,
|
105 |
+
"grad_norm": 1.7973794229669702,
|
106 |
+
"kl": 1.01513671875,
|
107 |
+
"learning_rate": 1.6808050203829845e-06,
|
108 |
+
"loss": 0.1836,
|
109 |
+
"reward": 0.6228495962917805,
|
110 |
+
"reward_std": 0.21852513104677201,
|
111 |
+
"rewards/accuracy_reward": 0.6353794872760773,
|
112 |
+
"rewards/format_reward": 0.0,
|
113 |
+
"rewards/len_penalty": -0.01252990250941366,
|
114 |
+
"step": 30
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"clip_ratio": 0.0,
|
118 |
+
"completion_length": 475.1066070556641,
|
119 |
+
"epoch": 1.2042553191489362,
|
120 |
+
"grad_norm": 3.0368202315739117,
|
121 |
+
"kl": 1.555859375,
|
122 |
+
"learning_rate": 1.2296174432791415e-06,
|
123 |
+
"loss": 0.2713,
|
124 |
+
"reward": 0.559271278232336,
|
125 |
+
"reward_std": 0.24244545102119447,
|
126 |
+
"rewards/accuracy_reward": 0.5708705581724643,
|
127 |
+
"rewards/format_reward": 0.0,
|
128 |
+
"rewards/len_penalty": -0.011599282221868634,
|
129 |
+
"step": 35
|
130 |
+
},
|
131 |
+
{
|
132 |
+
"clip_ratio": 0.0,
|
133 |
+
"completion_length": 469.2449981689453,
|
134 |
+
"epoch": 1.374468085106383,
|
135 |
+
"grad_norm": 3.5433702308800723,
|
136 |
+
"kl": 1.345703125,
|
137 |
+
"learning_rate": 8.029152419343472e-07,
|
138 |
+
"loss": 0.2314,
|
139 |
+
"reward": 0.5598608091473579,
|
140 |
+
"reward_std": 0.26654755510389805,
|
141 |
+
"rewards/accuracy_reward": 0.5713169902563096,
|
142 |
+
"rewards/format_reward": 0.0,
|
143 |
+
"rewards/len_penalty": -0.011456176661886275,
|
144 |
+
"step": 40
|
145 |
+
},
|
146 |
+
{
|
147 |
+
"clip_ratio": 0.0,
|
148 |
+
"completion_length": 475.7722343444824,
|
149 |
+
"epoch": 1.5446808510638297,
|
150 |
+
"grad_norm": 1.1370291260510161,
|
151 |
+
"kl": 1.3955078125,
|
152 |
+
"learning_rate": 4.3933982822017883e-07,
|
153 |
+
"loss": 0.2259,
|
154 |
+
"reward": 0.5786746814846992,
|
155 |
+
"reward_std": 0.2622571483254433,
|
156 |
+
"rewards/accuracy_reward": 0.5902902036905289,
|
157 |
+
"rewards/format_reward": 0.0,
|
158 |
+
"rewards/len_penalty": -0.011615533195436002,
|
159 |
+
"step": 45
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"clip_ratio": 0.0,
|
163 |
+
"completion_length": 474.67189865112306,
|
164 |
+
"epoch": 1.7148936170212767,
|
165 |
+
"grad_norm": 1.7209049738299256,
|
166 |
+
"kl": 1.1173828125,
|
167 |
+
"learning_rate": 1.718159615201853e-07,
|
168 |
+
"loss": 0.1973,
|
169 |
+
"reward": 0.5861792124807834,
|
170 |
+
"reward_std": 0.25209669955074787,
|
171 |
+
"rewards/accuracy_reward": 0.5977678894996643,
|
172 |
+
"rewards/format_reward": 0.0,
|
173 |
+
"rewards/len_penalty": -0.011588669382035732,
|
174 |
+
"step": 50
|
175 |
+
},
|
176 |
+
{
|
177 |
+
"clip_ratio": 0.0,
|
178 |
+
"completion_length": 478.20337142944334,
|
179 |
+
"epoch": 1.8851063829787233,
|
180 |
+
"grad_norm": 1.3684947080685528,
|
181 |
+
"kl": 1.382421875,
|
182 |
+
"learning_rate": 2.4570139579284723e-08,
|
183 |
+
"loss": 0.2311,
|
184 |
+
"reward": 0.5730349622666836,
|
185 |
+
"reward_std": 0.24952978417277336,
|
186 |
+
"rewards/accuracy_reward": 0.5847098492085934,
|
187 |
+
"rewards/format_reward": 0.0,
|
188 |
+
"rewards/len_penalty": -0.011674887221306562,
|
189 |
+
"step": 55
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"clip_ratio": 0.0,
|
193 |
+
"completion_length": 478.4012222290039,
|
194 |
+
"epoch": 1.9872340425531916,
|
195 |
+
"kl": 1.4332682291666667,
|
196 |
+
"reward": 0.5787627287209034,
|
197 |
+
"reward_std": 0.2581109864016374,
|
198 |
+
"rewards/accuracy_reward": 0.5904018133878708,
|
199 |
+
"rewards/format_reward": 0.0,
|
200 |
+
"rewards/len_penalty": -0.011639068795678517,
|
201 |
+
"step": 58,
|
202 |
+
"total_flos": 0.0,
|
203 |
+
"train_loss": 0.1985041233229226,
|
204 |
+
"train_runtime": 18468.5879,
|
205 |
+
"train_samples_per_second": 0.812,
|
206 |
+
"train_steps_per_second": 0.003
|
207 |
+
}
|
208 |
+
],
|
209 |
+
"logging_steps": 5,
|
210 |
+
"max_steps": 58,
|
211 |
+
"num_input_tokens_seen": 0,
|
212 |
+
"num_train_epochs": 2,
|
213 |
+
"save_steps": 10,
|
214 |
+
"stateful_callbacks": {
|
215 |
+
"TrainerControl": {
|
216 |
+
"args": {
|
217 |
+
"should_epoch_stop": false,
|
218 |
+
"should_evaluate": false,
|
219 |
+
"should_log": false,
|
220 |
+
"should_save": true,
|
221 |
+
"should_training_stop": true
|
222 |
+
},
|
223 |
+
"attributes": {}
|
224 |
+
}
|
225 |
+
},
|
226 |
+
"total_flos": 0.0,
|
227 |
+
"train_batch_size": 32,
|
228 |
+
"trial_name": null,
|
229 |
+
"trial_params": null
|
230 |
+
}
|