chenggong1995 commited on
Commit
80b1cee
·
verified ·
1 Parent(s): 0dec13b

Model save

Browse files
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-3B-Instruct
3
+ library_name: transformers
4
+ model_name: Qwen2.5-3B-Instruct-grpo-MATHDATA-E1
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - grpo
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen2.5-3B-Instruct-grpo-MATHDATA-E1
13
+
14
+ This model is a fine-tuned version of [Qwen/Qwen2.5-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct).
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="chenggong1995/Qwen2.5-3B-Instruct-grpo-MATHDATA-E1", 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/gongc1995-city-university-of-hong-kong/huggingface/runs/nut4sim8)
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.3.2
41
+ - Tokenizers: 0.21.0
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.023221049398088302,
4
+ "train_runtime": 8217.2755,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.913,
7
+ "train_steps_per_second": 0.009
8
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.05,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "4.49.0"
14
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": 0.023221049398088302,
4
+ "train_runtime": 8217.2755,
5
+ "train_samples": 7500,
6
+ "train_samples_per_second": 0.913,
7
+ "train_steps_per_second": 0.009
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.9984,
5
+ "eval_steps": 83,
6
+ "global_step": 78,
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": 686.6350830078125,
14
+ "epoch": 0.064,
15
+ "grad_norm": 0.493407666683197,
16
+ "kl": 0.00012958049774169922,
17
+ "learning_rate": 1.2499999999999999e-06,
18
+ "loss": -0.0056,
19
+ "reward": 1.0069444552063942,
20
+ "reward_std": 0.580621787160635,
21
+ "rewards/accuracy_reward": 0.3986111156642437,
22
+ "rewards/format_reward": 0.18090277863666415,
23
+ "rewards/tag_count_reward": 0.42743055820465087,
24
+ "step": 5
25
+ },
26
+ {
27
+ "clip_ratio": 0.0,
28
+ "completion_length": 652.9118125915527,
29
+ "epoch": 0.128,
30
+ "grad_norm": 51.891143798828125,
31
+ "kl": 13.452931213378907,
32
+ "learning_rate": 1.995974293995239e-06,
33
+ "loss": 0.1344,
34
+ "reward": 1.3629340469837188,
35
+ "reward_std": 0.62072244733572,
36
+ "rewards/accuracy_reward": 0.3295138917863369,
37
+ "rewards/format_reward": 0.3850694507360458,
38
+ "rewards/tag_count_reward": 0.6483506999909878,
39
+ "step": 10
40
+ },
41
+ {
42
+ "clip_ratio": 0.0,
43
+ "completion_length": 676.9017471313476,
44
+ "epoch": 0.192,
45
+ "grad_norm": 17.215152740478516,
46
+ "kl": 1.034814453125,
47
+ "learning_rate": 1.9510565162951534e-06,
48
+ "loss": 0.0138,
49
+ "reward": 1.5778646022081375,
50
+ "reward_std": 0.6299503356218338,
51
+ "rewards/accuracy_reward": 0.3361111145466566,
52
+ "rewards/format_reward": 0.4927083343267441,
53
+ "rewards/tag_count_reward": 0.7490451440215111,
54
+ "step": 15
55
+ },
56
+ {
57
+ "clip_ratio": 0.0,
58
+ "completion_length": 641.2159820556641,
59
+ "epoch": 0.256,
60
+ "grad_norm": 0.4615473449230194,
61
+ "kl": 0.032623291015625,
62
+ "learning_rate": 1.858448793601866e-06,
63
+ "loss": 0.0025,
64
+ "reward": 1.623437511920929,
65
+ "reward_std": 0.6311033435165883,
66
+ "rewards/accuracy_reward": 0.3847222276031971,
67
+ "rewards/format_reward": 0.5031250067055225,
68
+ "rewards/tag_count_reward": 0.7355902805924416,
69
+ "step": 20
70
+ },
71
+ {
72
+ "clip_ratio": 0.0,
73
+ "completion_length": 653.2670181274414,
74
+ "epoch": 0.32,
75
+ "grad_norm": 0.2847181260585785,
76
+ "kl": 0.04327239990234375,
77
+ "learning_rate": 1.7227948638273915e-06,
78
+ "loss": 0.0167,
79
+ "reward": 1.8901041924953461,
80
+ "reward_std": 0.6056328244507313,
81
+ "rewards/accuracy_reward": 0.395138892903924,
82
+ "rewards/format_reward": 0.6468750037252903,
83
+ "rewards/tag_count_reward": 0.8480902835726738,
84
+ "step": 25
85
+ },
86
+ {
87
+ "clip_ratio": 0.0,
88
+ "completion_length": 616.6788215637207,
89
+ "epoch": 0.384,
90
+ "grad_norm": 0.27531540393829346,
91
+ "kl": 5.2246551513671875,
92
+ "learning_rate": 1.5508969814521024e-06,
93
+ "loss": 0.0613,
94
+ "reward": 2.1147569686174394,
95
+ "reward_std": 0.540030462294817,
96
+ "rewards/accuracy_reward": 0.37777778282761576,
97
+ "rewards/format_reward": 0.8107638955116272,
98
+ "rewards/tag_count_reward": 0.9262152895331383,
99
+ "step": 30
100
+ },
101
+ {
102
+ "clip_ratio": 0.0,
103
+ "completion_length": 638.4989616394043,
104
+ "epoch": 0.448,
105
+ "grad_norm": 0.2678464651107788,
106
+ "kl": 0.0264862060546875,
107
+ "learning_rate": 1.3513748240813427e-06,
108
+ "loss": 0.0124,
109
+ "reward": 2.2046007037162783,
110
+ "reward_std": 0.47457179576158526,
111
+ "rewards/accuracy_reward": 0.3527777839452028,
112
+ "rewards/format_reward": 0.8920138970017433,
113
+ "rewards/tag_count_reward": 0.9598090335726738,
114
+ "step": 35
115
+ },
116
+ {
117
+ "clip_ratio": 0.0,
118
+ "completion_length": 643.7434097290039,
119
+ "epoch": 0.512,
120
+ "grad_norm": 0.22826902568340302,
121
+ "kl": 0.0377349853515625,
122
+ "learning_rate": 1.1342332658176555e-06,
123
+ "loss": 0.0127,
124
+ "reward": 2.335156279802322,
125
+ "reward_std": 0.4647583156824112,
126
+ "rewards/accuracy_reward": 0.45034722685813905,
127
+ "rewards/format_reward": 0.9152777850627899,
128
+ "rewards/tag_count_reward": 0.9695312604308128,
129
+ "step": 40
130
+ },
131
+ {
132
+ "clip_ratio": 0.0,
133
+ "completion_length": 629.6038261413574,
134
+ "epoch": 0.576,
135
+ "grad_norm": 0.32088664174079895,
136
+ "kl": 0.04580535888671875,
137
+ "learning_rate": 9.103606910965665e-07,
138
+ "loss": 0.008,
139
+ "reward": 2.414062523841858,
140
+ "reward_std": 0.40865729935467243,
141
+ "rewards/accuracy_reward": 0.5135416679084301,
142
+ "rewards/format_reward": 0.9260416761040687,
143
+ "rewards/tag_count_reward": 0.974479179084301,
144
+ "step": 45
145
+ },
146
+ {
147
+ "clip_ratio": 0.0,
148
+ "completion_length": 656.8579933166504,
149
+ "epoch": 0.64,
150
+ "grad_norm": 2.3553261756896973,
151
+ "kl": 0.08855743408203125,
152
+ "learning_rate": 6.909830056250526e-07,
153
+ "loss": 0.0135,
154
+ "reward": 2.4554687619209288,
155
+ "reward_std": 0.38128191530704497,
156
+ "rewards/accuracy_reward": 0.5336805626749992,
157
+ "rewards/format_reward": 0.9430555611848831,
158
+ "rewards/tag_count_reward": 0.9787326440215111,
159
+ "step": 50
160
+ },
161
+ {
162
+ "clip_ratio": 0.0,
163
+ "completion_length": 652.9923721313477,
164
+ "epoch": 0.704,
165
+ "grad_norm": 2.0868406295776367,
166
+ "kl": 0.0515777587890625,
167
+ "learning_rate": 4.871007225940939e-07,
168
+ "loss": 0.015,
169
+ "reward": 2.487239581346512,
170
+ "reward_std": 0.3608484253287315,
171
+ "rewards/accuracy_reward": 0.5642361134290695,
172
+ "rewards/format_reward": 0.9427083373069763,
173
+ "rewards/tag_count_reward": 0.9802951425313949,
174
+ "step": 55
175
+ },
176
+ {
177
+ "clip_ratio": 0.0,
178
+ "completion_length": 650.6635467529297,
179
+ "epoch": 0.768,
180
+ "grad_norm": 0.19568555057048798,
181
+ "kl": 0.035595703125,
182
+ "learning_rate": 3.0893735101313535e-07,
183
+ "loss": 0.0199,
184
+ "reward": 2.501822918653488,
185
+ "reward_std": 0.35273106172680857,
186
+ "rewards/accuracy_reward": 0.5711805634200573,
187
+ "rewards/format_reward": 0.947569452226162,
188
+ "rewards/tag_count_reward": 0.9830729216337204,
189
+ "step": 60
190
+ },
191
+ {
192
+ "clip_ratio": 0.0,
193
+ "completion_length": 637.9875061035157,
194
+ "epoch": 0.832,
195
+ "grad_norm": 0.23244014382362366,
196
+ "kl": 0.03612060546875,
197
+ "learning_rate": 1.6542674627869734e-07,
198
+ "loss": 0.0137,
199
+ "reward": 2.5010416865348817,
200
+ "reward_std": 0.34778057783842087,
201
+ "rewards/accuracy_reward": 0.5725694492459297,
202
+ "rewards/format_reward": 0.9472222268581391,
203
+ "rewards/tag_count_reward": 0.9812500059604645,
204
+ "step": 65
205
+ },
206
+ {
207
+ "clip_ratio": 0.0,
208
+ "completion_length": 633.2107666015625,
209
+ "epoch": 0.896,
210
+ "grad_norm": 71.81304168701172,
211
+ "kl": 0.2681488037109375,
212
+ "learning_rate": 6.376512936026279e-08,
213
+ "loss": 0.0135,
214
+ "reward": 2.534635454416275,
215
+ "reward_std": 0.3476743776351213,
216
+ "rewards/accuracy_reward": 0.5899305626749992,
217
+ "rewards/format_reward": 0.9600694462656975,
218
+ "rewards/tag_count_reward": 0.9846354201436043,
219
+ "step": 70
220
+ },
221
+ {
222
+ "clip_ratio": 0.0,
223
+ "completion_length": 632.5708358764648,
224
+ "epoch": 0.96,
225
+ "grad_norm": 0.19250567257404327,
226
+ "kl": 0.038299560546875,
227
+ "learning_rate": 9.050238232065299e-09,
228
+ "loss": 0.0194,
229
+ "reward": 2.515277796983719,
230
+ "reward_std": 0.37559727430343626,
231
+ "rewards/accuracy_reward": 0.5836805649101734,
232
+ "rewards/format_reward": 0.9520833417773247,
233
+ "rewards/tag_count_reward": 0.9795139014720917,
234
+ "step": 75
235
+ },
236
+ {
237
+ "clip_ratio": 0.0,
238
+ "completion_length": 630.8084576924642,
239
+ "epoch": 0.9984,
240
+ "kl": 0.040715535481770836,
241
+ "reward": 2.5170717736085257,
242
+ "reward_std": 0.3583106442044179,
243
+ "rewards/accuracy_reward": 0.5885416728754839,
244
+ "rewards/format_reward": 0.9496527860562006,
245
+ "rewards/tag_count_reward": 0.978877325852712,
246
+ "step": 78,
247
+ "total_flos": 0.0,
248
+ "train_loss": 0.023221049398088302,
249
+ "train_runtime": 8217.2755,
250
+ "train_samples_per_second": 0.913,
251
+ "train_steps_per_second": 0.009
252
+ }
253
+ ],
254
+ "logging_steps": 5,
255
+ "max_steps": 78,
256
+ "num_input_tokens_seen": 0,
257
+ "num_train_epochs": 1,
258
+ "save_steps": 500,
259
+ "stateful_callbacks": {
260
+ "TrainerControl": {
261
+ "args": {
262
+ "should_epoch_stop": false,
263
+ "should_evaluate": false,
264
+ "should_log": false,
265
+ "should_save": true,
266
+ "should_training_stop": true
267
+ },
268
+ "attributes": {}
269
+ }
270
+ },
271
+ "total_flos": 0.0,
272
+ "train_batch_size": 12,
273
+ "trial_name": null,
274
+ "trial_params": null
275
+ }