zijianh commited on
Commit
ee9517b
·
verified ·
1 Parent(s): e25b8ff

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-medium-0_01-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_01-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_01-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/cpkc5xj7)
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.17393977451941062,
4
+ "train_runtime": 17719.3192,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.847,
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.17393977451941062,
4
+ "train_runtime": 17719.3192,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.847,
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.25066120729021635,
16
+ "kl": 0.0,
17
+ "learning_rate": 5e-07,
18
+ "loss": 0.1125,
19
+ "reward": 0.737436331808567,
20
+ "reward_std": 0.1497634956613183,
21
+ "rewards/accuracy_reward": 0.7421875298023224,
22
+ "rewards/format_reward": 0.0,
23
+ "rewards/len_penalty": -0.004751214059069753,
24
+ "step": 1
25
+ },
26
+ {
27
+ "clip_ratio": 0.0,
28
+ "completion_length": 979.3401679992676,
29
+ "epoch": 0.1702127659574468,
30
+ "grad_norm": 0.2302441340574829,
31
+ "kl": 7.614493370056152e-05,
32
+ "learning_rate": 2.5e-06,
33
+ "loss": 0.1016,
34
+ "reward": 0.7308486774563789,
35
+ "reward_std": 0.1540980595164001,
36
+ "rewards/accuracy_reward": 0.7356306128203869,
37
+ "rewards/format_reward": 0.0,
38
+ "rewards/len_penalty": -0.004781934621860273,
39
+ "step": 5
40
+ },
41
+ {
42
+ "clip_ratio": 0.0,
43
+ "completion_length": 873.104167175293,
44
+ "epoch": 0.3404255319148936,
45
+ "grad_norm": 0.42359185734828586,
46
+ "kl": 0.00587923526763916,
47
+ "learning_rate": 2.956412726139078e-06,
48
+ "loss": 0.1009,
49
+ "reward": 0.7584600493311882,
50
+ "reward_std": 0.1573723241686821,
51
+ "rewards/accuracy_reward": 0.762723246216774,
52
+ "rewards/format_reward": 0.0,
53
+ "rewards/len_penalty": -0.004263204050948844,
54
+ "step": 10
55
+ },
56
+ {
57
+ "clip_ratio": 0.0,
58
+ "completion_length": 745.0973556518554,
59
+ "epoch": 0.5106382978723404,
60
+ "grad_norm": 62.01063791631681,
61
+ "kl": 0.424346923828125,
62
+ "learning_rate": 2.7836719084521715e-06,
63
+ "loss": 0.1137,
64
+ "reward": 0.6722547233104705,
65
+ "reward_std": 0.1982373122125864,
66
+ "rewards/accuracy_reward": 0.6758928880095482,
67
+ "rewards/format_reward": 0.0,
68
+ "rewards/len_penalty": -0.003638170822523534,
69
+ "step": 15
70
+ },
71
+ {
72
+ "clip_ratio": 0.0,
73
+ "completion_length": 586.5627494812012,
74
+ "epoch": 0.6808510638297872,
75
+ "grad_norm": 0.9091305232027161,
76
+ "kl": 0.769775390625,
77
+ "learning_rate": 2.4946839873611927e-06,
78
+ "loss": 0.1393,
79
+ "reward": 0.601042202860117,
80
+ "reward_std": 0.20822684429585933,
81
+ "rewards/accuracy_reward": 0.603906275331974,
82
+ "rewards/format_reward": 0.0,
83
+ "rewards/len_penalty": -0.002864075929392129,
84
+ "step": 20
85
+ },
86
+ {
87
+ "clip_ratio": 0.0,
88
+ "completion_length": 558.4970115661621,
89
+ "epoch": 0.851063829787234,
90
+ "grad_norm": 4.53697058337715,
91
+ "kl": 0.884765625,
92
+ "learning_rate": 2.1156192081791355e-06,
93
+ "loss": 0.1679,
94
+ "reward": 0.6045274563133717,
95
+ "reward_std": 0.21284419894218445,
96
+ "rewards/accuracy_reward": 0.6072544872760772,
97
+ "rewards/format_reward": 0.0,
98
+ "rewards/len_penalty": -0.002727036183932796,
99
+ "step": 25
100
+ },
101
+ {
102
+ "clip_ratio": 0.0,
103
+ "completion_length": 530.7533882141113,
104
+ "epoch": 1.0340425531914894,
105
+ "grad_norm": 3.8562770589516298,
106
+ "kl": 0.818994140625,
107
+ "learning_rate": 1.6808050203829845e-06,
108
+ "loss": 0.1617,
109
+ "reward": 0.6154981851577759,
110
+ "reward_std": 0.22405075579881667,
111
+ "rewards/accuracy_reward": 0.6180803872644901,
112
+ "rewards/format_reward": 0.0,
113
+ "rewards/len_penalty": -0.002582195942522958,
114
+ "step": 30
115
+ },
116
+ {
117
+ "clip_ratio": 0.0,
118
+ "completion_length": 497.5663185119629,
119
+ "epoch": 1.2042553191489362,
120
+ "grad_norm": 22.866090135660507,
121
+ "kl": 1.26787109375,
122
+ "learning_rate": 1.2296174432791415e-06,
123
+ "loss": 0.212,
124
+ "reward": 0.5886419266462326,
125
+ "reward_std": 0.24773433208465576,
126
+ "rewards/accuracy_reward": 0.5910714566707611,
127
+ "rewards/format_reward": 0.0,
128
+ "rewards/len_penalty": -0.0024295230163261295,
129
+ "step": 35
130
+ },
131
+ {
132
+ "clip_ratio": 0.0,
133
+ "completion_length": 494.5519203186035,
134
+ "epoch": 1.374468085106383,
135
+ "grad_norm": 2.82751872248447,
136
+ "kl": 1.95224609375,
137
+ "learning_rate": 8.029152419343472e-07,
138
+ "loss": 0.264,
139
+ "reward": 0.5949066542088985,
140
+ "reward_std": 0.25708167143166066,
141
+ "rewards/accuracy_reward": 0.5973214522004128,
142
+ "rewards/format_reward": 0.0,
143
+ "rewards/len_penalty": -0.002414804318686947,
144
+ "step": 40
145
+ },
146
+ {
147
+ "clip_ratio": 0.0,
148
+ "completion_length": 510.7599586486816,
149
+ "epoch": 1.5446808510638297,
150
+ "grad_norm": 1.1188472228674733,
151
+ "kl": 1.22158203125,
152
+ "learning_rate": 4.3933982822017883e-07,
153
+ "loss": 0.2053,
154
+ "reward": 0.5883542984724045,
155
+ "reward_std": 0.25047608427703383,
156
+ "rewards/accuracy_reward": 0.5908482417464256,
157
+ "rewards/format_reward": 0.0,
158
+ "rewards/len_penalty": -0.002493945072637871,
159
+ "step": 45
160
+ },
161
+ {
162
+ "clip_ratio": 0.0,
163
+ "completion_length": 516.5424369812011,
164
+ "epoch": 1.7148936170212767,
165
+ "grad_norm": 1.5793754040342751,
166
+ "kl": 1.18623046875,
167
+ "learning_rate": 1.718159615201853e-07,
168
+ "loss": 0.2085,
169
+ "reward": 0.6019421294331551,
170
+ "reward_std": 0.2471614670008421,
171
+ "rewards/accuracy_reward": 0.6044643111526966,
172
+ "rewards/format_reward": 0.0,
173
+ "rewards/len_penalty": -0.002522179845254868,
174
+ "step": 50
175
+ },
176
+ {
177
+ "clip_ratio": 0.0,
178
+ "completion_length": 522.2845085144043,
179
+ "epoch": 1.8851063829787233,
180
+ "grad_norm": 1.202040205779595,
181
+ "kl": 1.11318359375,
182
+ "learning_rate": 2.4570139579284723e-08,
183
+ "loss": 0.2133,
184
+ "reward": 0.609391774237156,
185
+ "reward_std": 0.23280140571296215,
186
+ "rewards/accuracy_reward": 0.6119419939815998,
187
+ "rewards/format_reward": 0.0,
188
+ "rewards/len_penalty": -0.002550217299722135,
189
+ "step": 55
190
+ },
191
+ {
192
+ "clip_ratio": 0.0,
193
+ "completion_length": 531.5718307495117,
194
+ "epoch": 1.9872340425531916,
195
+ "kl": 1.1866861979166667,
196
+ "reward": 0.620554693043232,
197
+ "reward_std": 0.23846940882503986,
198
+ "rewards/accuracy_reward": 0.6231399103999138,
199
+ "rewards/format_reward": 0.0,
200
+ "rewards/len_penalty": -0.002585208606130133,
201
+ "step": 58,
202
+ "total_flos": 0.0,
203
+ "train_loss": 0.17393977451941062,
204
+ "train_runtime": 17719.3192,
205
+ "train_samples_per_second": 0.847,
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
+ }