zijianh commited on
Commit
d573650
·
verified ·
1 Parent(s): c16633c

Model save

Browse files
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/nbrpsw2q)
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.1866766851523827,
4
+ "train_runtime": 17842.1504,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.841,
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.1866766851523827,
4
+ "train_runtime": 17842.1504,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.841,
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.2631084113360146,
16
+ "kl": 0.0,
17
+ "learning_rate": 5e-07,
18
+ "loss": 0.1238,
19
+ "reward": 0.698086328804493,
20
+ "reward_std": 0.13120541395619512,
21
+ "rewards/accuracy_reward": 0.745535746216774,
22
+ "rewards/format_reward": 0.0,
23
+ "rewards/len_penalty": -0.04744941322132945,
24
+ "step": 1
25
+ },
26
+ {
27
+ "clip_ratio": 0.0,
28
+ "completion_length": 979.8407287597656,
29
+ "epoch": 0.1702127659574468,
30
+ "grad_norm": 0.22684407077545118,
31
+ "kl": 7.544457912445068e-05,
32
+ "learning_rate": 2.5e-06,
33
+ "loss": 0.1155,
34
+ "reward": 0.6869497802108526,
35
+ "reward_std": 0.16120319138281047,
36
+ "rewards/accuracy_reward": 0.734793558716774,
37
+ "rewards/format_reward": 0.0,
38
+ "rewards/len_penalty": -0.047843783744610846,
39
+ "step": 5
40
+ },
41
+ {
42
+ "clip_ratio": 0.0,
43
+ "completion_length": 872.467677307129,
44
+ "epoch": 0.3404255319148936,
45
+ "grad_norm": 0.4684158119972997,
46
+ "kl": 0.00807795524597168,
47
+ "learning_rate": 2.956412726139078e-06,
48
+ "loss": 0.1146,
49
+ "reward": 0.7163276463747025,
50
+ "reward_std": 0.16980856116861104,
51
+ "rewards/accuracy_reward": 0.7589286044239998,
52
+ "rewards/format_reward": 0.0,
53
+ "rewards/len_penalty": -0.04260096037760377,
54
+ "step": 10
55
+ },
56
+ {
57
+ "clip_ratio": 0.0,
58
+ "completion_length": 751.1273788452148,
59
+ "epoch": 0.5106382978723404,
60
+ "grad_norm": 1.2177198858526401,
61
+ "kl": 0.34739990234375,
62
+ "learning_rate": 2.7836719084521715e-06,
63
+ "loss": 0.1264,
64
+ "reward": 0.6330783508718014,
65
+ "reward_std": 0.20811637695878743,
66
+ "rewards/accuracy_reward": 0.6697544969618321,
67
+ "rewards/format_reward": 0.0,
68
+ "rewards/len_penalty": -0.03667614138685167,
69
+ "step": 15
70
+ },
71
+ {
72
+ "clip_ratio": 0.0,
73
+ "completion_length": 613.7534912109375,
74
+ "epoch": 0.6808510638297872,
75
+ "grad_norm": 1.3980210820254566,
76
+ "kl": 0.744873046875,
77
+ "learning_rate": 2.4946839873611927e-06,
78
+ "loss": 0.1578,
79
+ "reward": 0.5512815967202187,
80
+ "reward_std": 0.23243679329752923,
81
+ "rewards/accuracy_reward": 0.581250024586916,
82
+ "rewards/format_reward": 0.0,
83
+ "rewards/len_penalty": -0.0299684323836118,
84
+ "step": 20
85
+ },
86
+ {
87
+ "clip_ratio": 0.0,
88
+ "completion_length": 582.3771484375,
89
+ "epoch": 0.851063829787234,
90
+ "grad_norm": 1.8890671871166043,
91
+ "kl": 0.9321044921875,
92
+ "learning_rate": 2.1156192081791355e-06,
93
+ "loss": 0.1965,
94
+ "reward": 0.56687613427639,
95
+ "reward_std": 0.21850477196276188,
96
+ "rewards/accuracy_reward": 0.5953125260770321,
97
+ "rewards/format_reward": 0.0,
98
+ "rewards/len_penalty": -0.028436384443193675,
99
+ "step": 25
100
+ },
101
+ {
102
+ "clip_ratio": 0.0,
103
+ "completion_length": 557.1671844482422,
104
+ "epoch": 1.0340425531914894,
105
+ "grad_norm": 6.969148820152461,
106
+ "kl": 0.90537109375,
107
+ "learning_rate": 1.6808050203829845e-06,
108
+ "loss": 0.1776,
109
+ "reward": 0.609768246114254,
110
+ "reward_std": 0.20966911502182484,
111
+ "rewards/accuracy_reward": 0.6368303805589676,
112
+ "rewards/format_reward": 0.0,
113
+ "rewards/len_penalty": -0.027062145154923202,
114
+ "step": 30
115
+ },
116
+ {
117
+ "clip_ratio": 0.0,
118
+ "completion_length": 529.0748001098633,
119
+ "epoch": 1.2042553191489362,
120
+ "grad_norm": 1.6903572527831305,
121
+ "kl": 0.88388671875,
122
+ "learning_rate": 1.2296174432791415e-06,
123
+ "loss": 0.1976,
124
+ "reward": 0.6035189718008042,
125
+ "reward_std": 0.20989050157368183,
126
+ "rewards/accuracy_reward": 0.6293527103960515,
127
+ "rewards/format_reward": 0.0,
128
+ "rewards/len_penalty": -0.025833730399608613,
129
+ "step": 35
130
+ },
131
+ {
132
+ "clip_ratio": 0.0,
133
+ "completion_length": 518.8400924682617,
134
+ "epoch": 1.374468085106383,
135
+ "grad_norm": 1.140228131246192,
136
+ "kl": 1.342578125,
137
+ "learning_rate": 8.029152419343472e-07,
138
+ "loss": 0.2382,
139
+ "reward": 0.5803579963743687,
140
+ "reward_std": 0.23556350730359554,
141
+ "rewards/accuracy_reward": 0.6056919865310192,
142
+ "rewards/format_reward": 0.0,
143
+ "rewards/len_penalty": -0.025333988945931196,
144
+ "step": 40
145
+ },
146
+ {
147
+ "clip_ratio": 0.0,
148
+ "completion_length": 512.1945533752441,
149
+ "epoch": 1.5446808510638297,
150
+ "grad_norm": 1.4935623924313746,
151
+ "kl": 0.83896484375,
152
+ "learning_rate": 4.3933982822017883e-07,
153
+ "loss": 0.2043,
154
+ "reward": 0.5334726713597775,
155
+ "reward_std": 0.25458414256572726,
156
+ "rewards/accuracy_reward": 0.5584821730852128,
157
+ "rewards/format_reward": 0.0,
158
+ "rewards/len_penalty": -0.025009499955922367,
159
+ "step": 45
160
+ },
161
+ {
162
+ "clip_ratio": 0.0,
163
+ "completion_length": 510.34209899902345,
164
+ "epoch": 1.7148936170212767,
165
+ "grad_norm": 2.5529208106611776,
166
+ "kl": 1.512890625,
167
+ "learning_rate": 1.718159615201853e-07,
168
+ "loss": 0.2564,
169
+ "reward": 0.5088979430496693,
170
+ "reward_std": 0.26402820013463496,
171
+ "rewards/accuracy_reward": 0.5338169865310192,
172
+ "rewards/format_reward": 0.0,
173
+ "rewards/len_penalty": -0.02491904767230153,
174
+ "step": 50
175
+ },
176
+ {
177
+ "clip_ratio": 0.0,
178
+ "completion_length": 509.2735771179199,
179
+ "epoch": 1.8851063829787233,
180
+ "grad_norm": 1.2580199216017853,
181
+ "kl": 1.3421875,
182
+ "learning_rate": 2.4570139579284723e-08,
183
+ "loss": 0.2429,
184
+ "reward": 0.5227894008159637,
185
+ "reward_std": 0.24820317029953004,
186
+ "rewards/accuracy_reward": 0.5476562783122063,
187
+ "rewards/format_reward": 0.0,
188
+ "rewards/len_penalty": -0.02486687391065061,
189
+ "step": 55
190
+ },
191
+ {
192
+ "clip_ratio": 0.0,
193
+ "completion_length": 513.0390764872233,
194
+ "epoch": 1.9872340425531916,
195
+ "kl": 1.3177083333333333,
196
+ "reward": 0.5240900913874308,
197
+ "reward_std": 0.256128067150712,
198
+ "rewards/accuracy_reward": 0.54892115543286,
199
+ "rewards/format_reward": 0.0,
200
+ "rewards/len_penalty": -0.024831065131972235,
201
+ "step": 58,
202
+ "total_flos": 0.0,
203
+ "train_loss": 0.1866766851523827,
204
+ "train_runtime": 17842.1504,
205
+ "train_samples_per_second": 0.841,
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
+ }