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-high-0_1-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-high-0_1-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-high-0_1-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/jmiy00ow)
|
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.2185068104801507,
|
4 |
+
"train_runtime": 17682.4744,
|
5 |
+
"train_samples": 7500,
|
6 |
+
"train_samples_per_second": 0.848,
|
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.2185068104801507,
|
4 |
+
"train_runtime": 17682.4744,
|
5 |
+
"train_samples": 7500,
|
6 |
+
"train_samples_per_second": 0.848,
|
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": 971.7639999389648,
|
14 |
+
"epoch": 0.03404255319148936,
|
15 |
+
"grad_norm": 0.28463842001337397,
|
16 |
+
"kl": 0.0,
|
17 |
+
"learning_rate": 5e-07,
|
18 |
+
"loss": 0.134,
|
19 |
+
"reward": 0.5082886815071106,
|
20 |
+
"reward_std": 0.15963527746498585,
|
21 |
+
"rewards/accuracy_reward": 0.745535746216774,
|
22 |
+
"rewards/format_reward": 0.0,
|
23 |
+
"rewards/len_penalty": -0.23724707029759884,
|
24 |
+
"step": 1
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"clip_ratio": 0.0,
|
28 |
+
"completion_length": 974.6809825897217,
|
29 |
+
"epoch": 0.1702127659574468,
|
30 |
+
"grad_norm": 0.23728338609141092,
|
31 |
+
"kl": 7.671117782592773e-05,
|
32 |
+
"learning_rate": 2.5e-06,
|
33 |
+
"loss": 0.132,
|
34 |
+
"reward": 0.4996245112270117,
|
35 |
+
"reward_std": 0.1835802630521357,
|
36 |
+
"rewards/accuracy_reward": 0.737583739683032,
|
37 |
+
"rewards/format_reward": 0.0,
|
38 |
+
"rewards/len_penalty": -0.23795922426506877,
|
39 |
+
"step": 5
|
40 |
+
},
|
41 |
+
{
|
42 |
+
"clip_ratio": 0.0,
|
43 |
+
"completion_length": 867.940104675293,
|
44 |
+
"epoch": 0.3404255319148936,
|
45 |
+
"grad_norm": 0.6283062851573521,
|
46 |
+
"kl": 0.008861899375915527,
|
47 |
+
"learning_rate": 2.956412726139078e-06,
|
48 |
+
"loss": 0.1317,
|
49 |
+
"reward": 0.5490380935370922,
|
50 |
+
"reward_std": 0.1904804239049554,
|
51 |
+
"rewards/accuracy_reward": 0.7609375298023224,
|
52 |
+
"rewards/format_reward": 0.0,
|
53 |
+
"rewards/len_penalty": -0.21189943961799146,
|
54 |
+
"step": 10
|
55 |
+
},
|
56 |
+
{
|
57 |
+
"clip_ratio": 0.0,
|
58 |
+
"completion_length": 730.2546096801758,
|
59 |
+
"epoch": 0.5106382978723404,
|
60 |
+
"grad_norm": 1.310897088360317,
|
61 |
+
"kl": 0.26617431640625,
|
62 |
+
"learning_rate": 2.7836719084521715e-06,
|
63 |
+
"loss": 0.1354,
|
64 |
+
"reward": 0.47696074694395063,
|
65 |
+
"reward_std": 0.23283899687230586,
|
66 |
+
"rewards/accuracy_reward": 0.6552455656230449,
|
67 |
+
"rewards/format_reward": 0.0,
|
68 |
+
"rewards/len_penalty": -0.17828481681644917,
|
69 |
+
"step": 15
|
70 |
+
},
|
71 |
+
{
|
72 |
+
"clip_ratio": 0.0,
|
73 |
+
"completion_length": 575.1072868347168,
|
74 |
+
"epoch": 0.6808510638297872,
|
75 |
+
"grad_norm": 2.0875900059869346,
|
76 |
+
"kl": 0.91943359375,
|
77 |
+
"learning_rate": 2.4946839873611927e-06,
|
78 |
+
"loss": 0.178,
|
79 |
+
"reward": 0.44084297828376295,
|
80 |
+
"reward_std": 0.2517234329134226,
|
81 |
+
"rewards/accuracy_reward": 0.5812500230967999,
|
82 |
+
"rewards/format_reward": 0.0,
|
83 |
+
"rewards/len_penalty": -0.14040705244988202,
|
84 |
+
"step": 20
|
85 |
+
},
|
86 |
+
{
|
87 |
+
"clip_ratio": 0.0,
|
88 |
+
"completion_length": 543.0458961486817,
|
89 |
+
"epoch": 0.851063829787234,
|
90 |
+
"grad_norm": 8.217171705965015,
|
91 |
+
"kl": 1.1748046875,
|
92 |
+
"learning_rate": 2.1156192081791355e-06,
|
93 |
+
"loss": 0.2204,
|
94 |
+
"reward": 0.4586034990847111,
|
95 |
+
"reward_std": 0.23402524627745153,
|
96 |
+
"rewards/accuracy_reward": 0.5911830633878707,
|
97 |
+
"rewards/format_reward": 0.0,
|
98 |
+
"rewards/len_penalty": -0.13257956448942423,
|
99 |
+
"step": 25
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"clip_ratio": 0.0,
|
103 |
+
"completion_length": 521.1100387573242,
|
104 |
+
"epoch": 1.0340425531914894,
|
105 |
+
"grad_norm": 6.762082627347706,
|
106 |
+
"kl": 0.7322998046875,
|
107 |
+
"learning_rate": 1.6808050203829845e-06,
|
108 |
+
"loss": 0.1845,
|
109 |
+
"reward": 0.5005072712898254,
|
110 |
+
"reward_std": 0.23026448152959347,
|
111 |
+
"rewards/accuracy_reward": 0.627120566368103,
|
112 |
+
"rewards/format_reward": 0.0,
|
113 |
+
"rewards/len_penalty": -0.1266132965683937,
|
114 |
+
"step": 30
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"clip_ratio": 0.0,
|
118 |
+
"completion_length": 494.15995559692385,
|
119 |
+
"epoch": 1.2042553191489362,
|
120 |
+
"grad_norm": 3.1612480284068982,
|
121 |
+
"kl": 1.55126953125,
|
122 |
+
"learning_rate": 1.2296174432791415e-06,
|
123 |
+
"loss": 0.2725,
|
124 |
+
"reward": 0.48895372450351715,
|
125 |
+
"reward_std": 0.24462027363479139,
|
126 |
+
"rewards/accuracy_reward": 0.6095982402563095,
|
127 |
+
"rewards/format_reward": 0.0,
|
128 |
+
"rewards/len_penalty": -0.12064452040940524,
|
129 |
+
"step": 35
|
130 |
+
},
|
131 |
+
{
|
132 |
+
"clip_ratio": 0.0,
|
133 |
+
"completion_length": 483.87390594482423,
|
134 |
+
"epoch": 1.374468085106383,
|
135 |
+
"grad_norm": 4.294437421320427,
|
136 |
+
"kl": 1.28154296875,
|
137 |
+
"learning_rate": 8.029152419343472e-07,
|
138 |
+
"loss": 0.2563,
|
139 |
+
"reward": 0.47126407250761987,
|
140 |
+
"reward_std": 0.2647111125290394,
|
141 |
+
"rewards/accuracy_reward": 0.5893973462283612,
|
142 |
+
"rewards/format_reward": 0.0,
|
143 |
+
"rewards/len_penalty": -0.1181332778185606,
|
144 |
+
"step": 40
|
145 |
+
},
|
146 |
+
{
|
147 |
+
"clip_ratio": 0.0,
|
148 |
+
"completion_length": 481.56776733398436,
|
149 |
+
"epoch": 1.5446808510638297,
|
150 |
+
"grad_norm": 4.491684991262943,
|
151 |
+
"kl": 1.42666015625,
|
152 |
+
"learning_rate": 4.3933982822017883e-07,
|
153 |
+
"loss": 0.2752,
|
154 |
+
"reward": 0.4363360181450844,
|
155 |
+
"reward_std": 0.2855977095663548,
|
156 |
+
"rewards/accuracy_reward": 0.5539062716066837,
|
157 |
+
"rewards/format_reward": 0.0,
|
158 |
+
"rewards/len_penalty": -0.11757025569677353,
|
159 |
+
"step": 45
|
160 |
+
},
|
161 |
+
{
|
162 |
+
"clip_ratio": 0.0,
|
163 |
+
"completion_length": 484.0088371276855,
|
164 |
+
"epoch": 1.7148936170212767,
|
165 |
+
"grad_norm": 2.1484729806652747,
|
166 |
+
"kl": 1.5796875,
|
167 |
+
"learning_rate": 1.718159615201853e-07,
|
168 |
+
"loss": 0.2947,
|
169 |
+
"reward": 0.4461195237934589,
|
170 |
+
"reward_std": 0.28383450768887997,
|
171 |
+
"rewards/accuracy_reward": 0.564285734295845,
|
172 |
+
"rewards/format_reward": 0.0,
|
173 |
+
"rewards/len_penalty": -0.11816622000187635,
|
174 |
+
"step": 50
|
175 |
+
},
|
176 |
+
{
|
177 |
+
"clip_ratio": 0.0,
|
178 |
+
"completion_length": 489.8710029602051,
|
179 |
+
"epoch": 1.8851063829787233,
|
180 |
+
"grad_norm": 1.8313195035052112,
|
181 |
+
"kl": 1.49287109375,
|
182 |
+
"learning_rate": 2.4570139579284723e-08,
|
183 |
+
"loss": 0.2968,
|
184 |
+
"reward": 0.44390707574784755,
|
185 |
+
"reward_std": 0.281308988109231,
|
186 |
+
"rewards/accuracy_reward": 0.5635044880211353,
|
187 |
+
"rewards/format_reward": 0.0,
|
188 |
+
"rewards/len_penalty": -0.11959741283208132,
|
189 |
+
"step": 55
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"clip_ratio": 0.0,
|
193 |
+
"completion_length": 490.9578692118327,
|
194 |
+
"epoch": 1.9872340425531916,
|
195 |
+
"kl": 1.4850260416666667,
|
196 |
+
"reward": 0.4616190791130066,
|
197 |
+
"reward_std": 0.27286908278862637,
|
198 |
+
"rewards/accuracy_reward": 0.5811012176175913,
|
199 |
+
"rewards/format_reward": 0.0,
|
200 |
+
"rewards/len_penalty": -0.1194821372628212,
|
201 |
+
"step": 58,
|
202 |
+
"total_flos": 0.0,
|
203 |
+
"train_loss": 0.2185068104801507,
|
204 |
+
"train_runtime": 17682.4744,
|
205 |
+
"train_samples_per_second": 0.848,
|
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 |
+
}
|