zzhang1987 commited on
Commit
094b385
·
verified ·
1 Parent(s): 12e8f4e

Model save

Browse files
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-VL-3B-Instruct
3
+ library_name: transformers
4
+ model_name: Qwen2.5-VL-3B-Instruct-Open-R1-Distill-select
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - grpo
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen2.5-VL-3B-Instruct-Open-R1-Distill-select
13
+
14
+ This model is a fine-tuned version of [Qwen/Qwen2.5-VL-3B-Instruct](https://huggingface.co/Qwen/Qwen2.5-VL-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="zzhang1987/Qwen2.5-VL-3B-Instruct-Open-R1-Distill-select", 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/causalai/huggingface/runs/e1ladt2z)
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.15.0.dev0
38
+ - Transformers: 4.49.0.dev0
39
+ - Pytorch: 2.5.1
40
+ - Datasets: 3.2.0
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.08425404627709404,
4
+ "train_runtime": 290681.8756,
5
+ "train_samples": 17056,
6
+ "train_samples_per_second": 0.059,
7
+ "train_steps_per_second": 0.0
8
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attn_implementation": "flash_attention_2",
3
+ "bos_token_id": 151643,
4
+ "do_sample": true,
5
+ "eos_token_id": [
6
+ 151645,
7
+ 151643
8
+ ],
9
+ "pad_token_id": 151643,
10
+ "repetition_penalty": 1.05,
11
+ "temperature": 0.1,
12
+ "top_k": 1,
13
+ "top_p": 0.001,
14
+ "transformers_version": "4.49.0.dev0",
15
+ "use_cache": false
16
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 0.0,
3
+ "train_loss": 0.08425404627709404,
4
+ "train_runtime": 290681.8756,
5
+ "train_samples": 17056,
6
+ "train_samples_per_second": 0.059,
7
+ "train_steps_per_second": 0.0
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 0.99812382739212,
5
+ "eval_steps": 100,
6
+ "global_step": 133,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "completion_length": 83.688671875,
13
+ "epoch": 0.0375234521575985,
14
+ "grad_norm": 2.9919118881225586,
15
+ "kl": 0.01474391222000122,
16
+ "learning_rate": 7.1428571428571436e-06,
17
+ "loss": 0.0006,
18
+ "reward": 0.064453125,
19
+ "reward_std": 0.10932583417743444,
20
+ "rewards/accuracy_reward": 0.03828125,
21
+ "rewards/format_reward": 0.026171875,
22
+ "step": 5
23
+ },
24
+ {
25
+ "completion_length": 67.101953125,
26
+ "epoch": 0.075046904315197,
27
+ "grad_norm": 6.934049129486084,
28
+ "kl": 0.3821044921875,
29
+ "learning_rate": 1.4285714285714287e-05,
30
+ "loss": 0.0153,
31
+ "reward": 1.072265625,
32
+ "reward_std": 0.37313607819378375,
33
+ "rewards/accuracy_reward": 0.280078125,
34
+ "rewards/format_reward": 0.7921875,
35
+ "step": 10
36
+ },
37
+ {
38
+ "completion_length": 67.77265625,
39
+ "epoch": 0.1125703564727955,
40
+ "grad_norm": 4.7614545822143555,
41
+ "kl": 0.9060546875,
42
+ "learning_rate": 1.9996515418688493e-05,
43
+ "loss": 0.0363,
44
+ "reward": 1.28203125,
45
+ "reward_std": 0.3224642466753721,
46
+ "rewards/accuracy_reward": 0.357421875,
47
+ "rewards/format_reward": 0.924609375,
48
+ "step": 15
49
+ },
50
+ {
51
+ "completion_length": 46.908984375,
52
+ "epoch": 0.150093808630394,
53
+ "grad_norm": 2.170837640762329,
54
+ "kl": 1.436572265625,
55
+ "learning_rate": 1.9874809871741877e-05,
56
+ "loss": 0.0574,
57
+ "reward": 1.243359375,
58
+ "reward_std": 0.29788401871919634,
59
+ "rewards/accuracy_reward": 0.354296875,
60
+ "rewards/format_reward": 0.8890625,
61
+ "step": 20
62
+ },
63
+ {
64
+ "completion_length": 19.840625,
65
+ "epoch": 0.18761726078799248,
66
+ "grad_norm": 11.829867362976074,
67
+ "kl": 1.926123046875,
68
+ "learning_rate": 1.9581296124106682e-05,
69
+ "loss": 0.077,
70
+ "reward": 1.378515625,
71
+ "reward_std": 0.1831501940265298,
72
+ "rewards/accuracy_reward": 0.394921875,
73
+ "rewards/format_reward": 0.98359375,
74
+ "step": 25
75
+ },
76
+ {
77
+ "completion_length": 23.02890625,
78
+ "epoch": 0.225140712945591,
79
+ "grad_norm": 2.8077869415283203,
80
+ "kl": 1.7828125,
81
+ "learning_rate": 1.912108091398988e-05,
82
+ "loss": 0.0713,
83
+ "reward": 1.265234375,
84
+ "reward_std": 0.2775565652176738,
85
+ "rewards/accuracy_reward": 0.3453125,
86
+ "rewards/format_reward": 0.919921875,
87
+ "step": 30
88
+ },
89
+ {
90
+ "completion_length": 143.800390625,
91
+ "epoch": 0.2626641651031895,
92
+ "grad_norm": 4.427940845489502,
93
+ "kl": 5.769921875,
94
+ "learning_rate": 1.8502171357296144e-05,
95
+ "loss": 0.2308,
96
+ "reward": 1.275,
97
+ "reward_std": 0.3242990938946605,
98
+ "rewards/accuracy_reward": 0.38828125,
99
+ "rewards/format_reward": 0.88671875,
100
+ "step": 35
101
+ },
102
+ {
103
+ "completion_length": 78.410546875,
104
+ "epoch": 0.300187617260788,
105
+ "grad_norm": 7.971759796142578,
106
+ "kl": 1.417041015625,
107
+ "learning_rate": 1.773533563475053e-05,
108
+ "loss": 0.0567,
109
+ "reward": 1.32265625,
110
+ "reward_std": 0.2578751340508461,
111
+ "rewards/accuracy_reward": 0.39296875,
112
+ "rewards/format_reward": 0.9296875,
113
+ "step": 40
114
+ },
115
+ {
116
+ "completion_length": 87.709765625,
117
+ "epoch": 0.33771106941838647,
118
+ "grad_norm": 5.786956310272217,
119
+ "kl": 2.098046875,
120
+ "learning_rate": 1.6833915640265485e-05,
121
+ "loss": 0.0839,
122
+ "reward": 1.275,
123
+ "reward_std": 0.2750174166634679,
124
+ "rewards/accuracy_reward": 0.350390625,
125
+ "rewards/format_reward": 0.924609375,
126
+ "step": 45
127
+ },
128
+ {
129
+ "completion_length": 55.52890625,
130
+ "epoch": 0.37523452157598497,
131
+ "grad_norm": 7.353632926940918,
132
+ "kl": 2.449560546875,
133
+ "learning_rate": 1.58135948502146e-05,
134
+ "loss": 0.098,
135
+ "reward": 1.349609375,
136
+ "reward_std": 0.2235970703884959,
137
+ "rewards/accuracy_reward": 0.39140625,
138
+ "rewards/format_reward": 0.958203125,
139
+ "step": 50
140
+ },
141
+ {
142
+ "completion_length": 84.14375,
143
+ "epoch": 0.41275797373358347,
144
+ "grad_norm": 5.451722621917725,
145
+ "kl": 3.009326171875,
146
+ "learning_rate": 1.4692125452370664e-05,
147
+ "loss": 0.1204,
148
+ "reward": 1.3203125,
149
+ "reward_std": 0.276341262832284,
150
+ "rewards/accuracy_reward": 0.39296875,
151
+ "rewards/format_reward": 0.92734375,
152
+ "step": 55
153
+ },
154
+ {
155
+ "completion_length": 78.859375,
156
+ "epoch": 0.450281425891182,
157
+ "grad_norm": 7.11458683013916,
158
+ "kl": 2.8802734375,
159
+ "learning_rate": 1.348901948209167e-05,
160
+ "loss": 0.1152,
161
+ "reward": 1.30703125,
162
+ "reward_std": 0.2558631205931306,
163
+ "rewards/accuracy_reward": 0.38125,
164
+ "rewards/format_reward": 0.92578125,
165
+ "step": 60
166
+ },
167
+ {
168
+ "completion_length": 67.624609375,
169
+ "epoch": 0.4878048780487805,
170
+ "grad_norm": 1.283034324645996,
171
+ "kl": 2.932763671875,
172
+ "learning_rate": 1.2225209339563144e-05,
173
+ "loss": 0.1172,
174
+ "reward": 1.30546875,
175
+ "reward_std": 0.2915836155414581,
176
+ "rewards/accuracy_reward": 0.371875,
177
+ "rewards/format_reward": 0.93359375,
178
+ "step": 65
179
+ },
180
+ {
181
+ "completion_length": 42.2578125,
182
+ "epoch": 0.525328330206379,
183
+ "grad_norm": 1.8728909492492676,
184
+ "kl": 1.6790283203125,
185
+ "learning_rate": 1.092268359463302e-05,
186
+ "loss": 0.0672,
187
+ "reward": 1.354296875,
188
+ "reward_std": 0.18360752202570438,
189
+ "rewards/accuracy_reward": 0.38046875,
190
+ "rewards/format_reward": 0.973828125,
191
+ "step": 70
192
+ },
193
+ {
194
+ "completion_length": 41.86484375,
195
+ "epoch": 0.5628517823639775,
196
+ "grad_norm": 1.411981463432312,
197
+ "kl": 1.929052734375,
198
+ "learning_rate": 9.604104415737309e-06,
199
+ "loss": 0.0771,
200
+ "reward": 1.363671875,
201
+ "reward_std": 0.16208343636244535,
202
+ "rewards/accuracy_reward": 0.388671875,
203
+ "rewards/format_reward": 0.975,
204
+ "step": 75
205
+ },
206
+ {
207
+ "completion_length": 42.70625,
208
+ "epoch": 0.600375234521576,
209
+ "grad_norm": 116.23101806640625,
210
+ "kl": 2.564599609375,
211
+ "learning_rate": 8.292413279130625e-06,
212
+ "loss": 0.1025,
213
+ "reward": 1.3796875,
214
+ "reward_std": 0.14094665497541428,
215
+ "rewards/accuracy_reward": 0.403515625,
216
+ "rewards/format_reward": 0.976171875,
217
+ "step": 80
218
+ },
219
+ {
220
+ "completion_length": 48.035546875,
221
+ "epoch": 0.6378986866791745,
222
+ "grad_norm": 3.7647581100463867,
223
+ "kl": 2.155078125,
224
+ "learning_rate": 7.010431818542298e-06,
225
+ "loss": 0.0862,
226
+ "reward": 1.34609375,
227
+ "reward_std": 0.19041361436247825,
228
+ "rewards/accuracy_reward": 0.37890625,
229
+ "rewards/format_reward": 0.9671875,
230
+ "step": 85
231
+ },
232
+ {
233
+ "completion_length": 35.946875,
234
+ "epoch": 0.6754221388367729,
235
+ "grad_norm": 6.023601055145264,
236
+ "kl": 1.76474609375,
237
+ "learning_rate": 5.780464759928623e-06,
238
+ "loss": 0.0706,
239
+ "reward": 1.403125,
240
+ "reward_std": 0.15854822881519795,
241
+ "rewards/accuracy_reward": 0.423828125,
242
+ "rewards/format_reward": 0.979296875,
243
+ "step": 90
244
+ },
245
+ {
246
+ "completion_length": 50.437109375,
247
+ "epoch": 0.7129455909943715,
248
+ "grad_norm": 0.8968208432197571,
249
+ "kl": 2.5580078125,
250
+ "learning_rate": 4.623911849714226e-06,
251
+ "loss": 0.1024,
252
+ "reward": 1.43359375,
253
+ "reward_std": 0.19160135462880135,
254
+ "rewards/accuracy_reward": 0.46796875,
255
+ "rewards/format_reward": 0.965625,
256
+ "step": 95
257
+ },
258
+ {
259
+ "completion_length": 52.79609375,
260
+ "epoch": 0.7504690431519699,
261
+ "grad_norm": 3.7727835178375244,
262
+ "kl": 2.231298828125,
263
+ "learning_rate": 3.560895528440844e-06,
264
+ "loss": 0.0892,
265
+ "reward": 1.387109375,
266
+ "reward_std": 0.1720277236774564,
267
+ "rewards/accuracy_reward": 0.42265625,
268
+ "rewards/format_reward": 0.964453125,
269
+ "step": 100
270
+ },
271
+ {
272
+ "epoch": 0.7504690431519699,
273
+ "eval_completion_length": 79.31458830548927,
274
+ "eval_kl": 2.734799187052506,
275
+ "eval_loss": 0.1094130277633667,
276
+ "eval_reward": 1.933882756563246,
277
+ "eval_reward_std": 0.12067262680761,
278
+ "eval_rewards/accuracy_reward": 1.0,
279
+ "eval_rewards/format_reward": 0.9338827565632458,
280
+ "eval_runtime": 42224.1278,
281
+ "eval_samples_per_second": 0.159,
282
+ "eval_steps_per_second": 0.04,
283
+ "step": 100
284
+ },
285
+ {
286
+ "completion_length": 58.8546875,
287
+ "epoch": 0.7879924953095685,
288
+ "grad_norm": 2.529205322265625,
289
+ "kl": 2.80966796875,
290
+ "learning_rate": 2.6099108277934105e-06,
291
+ "loss": 0.1124,
292
+ "reward": 1.393359375,
293
+ "reward_std": 0.2058694703504443,
294
+ "rewards/accuracy_reward": 0.4375,
295
+ "rewards/format_reward": 0.955859375,
296
+ "step": 105
297
+ },
298
+ {
299
+ "completion_length": 41.609765625,
300
+ "epoch": 0.8255159474671669,
301
+ "grad_norm": 2.7298059463500977,
302
+ "kl": 2.009814453125,
303
+ "learning_rate": 1.7875035823168641e-06,
304
+ "loss": 0.0804,
305
+ "reward": 1.428125,
306
+ "reward_std": 0.1546448241919279,
307
+ "rewards/accuracy_reward": 0.455078125,
308
+ "rewards/format_reward": 0.973046875,
309
+ "step": 110
310
+ },
311
+ {
312
+ "completion_length": 42.476171875,
313
+ "epoch": 0.8630393996247655,
314
+ "grad_norm": 2.46567440032959,
315
+ "kl": 2.199267578125,
316
+ "learning_rate": 1.1079825545001887e-06,
317
+ "loss": 0.088,
318
+ "reward": 1.407421875,
319
+ "reward_std": 0.163567235134542,
320
+ "rewards/accuracy_reward": 0.435546875,
321
+ "rewards/format_reward": 0.971875,
322
+ "step": 115
323
+ },
324
+ {
325
+ "completion_length": 39.6296875,
326
+ "epoch": 0.900562851782364,
327
+ "grad_norm": 0.9802407622337341,
328
+ "kl": 1.873486328125,
329
+ "learning_rate": 5.831704818578842e-07,
330
+ "loss": 0.0749,
331
+ "reward": 1.403125,
332
+ "reward_std": 0.14327515792101622,
333
+ "rewards/accuracy_reward": 0.43125,
334
+ "rewards/format_reward": 0.971875,
335
+ "step": 120
336
+ },
337
+ {
338
+ "completion_length": 41.476171875,
339
+ "epoch": 0.9380863039399625,
340
+ "grad_norm": 2.266838550567627,
341
+ "kl": 1.964208984375,
342
+ "learning_rate": 2.2219837744959284e-07,
343
+ "loss": 0.0785,
344
+ "reward": 1.348828125,
345
+ "reward_std": 0.1762639505788684,
346
+ "rewards/accuracy_reward": 0.378515625,
347
+ "rewards/format_reward": 0.9703125,
348
+ "step": 125
349
+ },
350
+ {
351
+ "completion_length": 42.487890625,
352
+ "epoch": 0.975609756097561,
353
+ "grad_norm": 1.1838903427124023,
354
+ "kl": 2.059765625,
355
+ "learning_rate": 3.134666272774034e-08,
356
+ "loss": 0.0824,
357
+ "reward": 1.376171875,
358
+ "reward_std": 0.17894832883030176,
359
+ "rewards/accuracy_reward": 0.4140625,
360
+ "rewards/format_reward": 0.962109375,
361
+ "step": 130
362
+ },
363
+ {
364
+ "completion_length": 43.705729166666664,
365
+ "epoch": 0.99812382739212,
366
+ "kl": 2.0113932291666665,
367
+ "reward": 1.3984375,
368
+ "reward_std": 0.1683385424936811,
369
+ "rewards/accuracy_reward": 0.4309895833333333,
370
+ "rewards/format_reward": 0.9674479166666666,
371
+ "step": 133,
372
+ "total_flos": 0.0,
373
+ "train_loss": 0.08425404627709404,
374
+ "train_runtime": 290681.8756,
375
+ "train_samples_per_second": 0.059,
376
+ "train_steps_per_second": 0.0
377
+ }
378
+ ],
379
+ "logging_steps": 5,
380
+ "max_steps": 133,
381
+ "num_input_tokens_seen": 0,
382
+ "num_train_epochs": 1,
383
+ "save_steps": 30,
384
+ "stateful_callbacks": {
385
+ "TrainerControl": {
386
+ "args": {
387
+ "should_epoch_stop": false,
388
+ "should_evaluate": false,
389
+ "should_log": false,
390
+ "should_save": true,
391
+ "should_training_stop": true
392
+ },
393
+ "attributes": {}
394
+ }
395
+ },
396
+ "total_flos": 0.0,
397
+ "train_batch_size": 1,
398
+ "trial_name": null,
399
+ "trial_params": null
400
+ }