flyingbugs commited on
Commit
7169b49
·
verified ·
1 Parent(s): b16038e

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-Math-7B-Instruct
3
+ library_name: transformers
4
+ model_name: Qwen2.5-Math-7B-LIMO
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen2.5-Math-7B-LIMO
13
+
14
+ This model is a fine-tuned version of [Qwen/Qwen2.5-Math-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Math-7B-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="flyingbugs/Qwen2.5-Math-7B-LIMO", 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/jjh233/huggingface/runs/rnhxytu3)
31
+
32
+
33
+ This model was trained with SFT.
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
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ 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},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 6.364145551230894e+17,
3
+ "train_loss": 1.0789901279486143,
4
+ "train_runtime": 4151.3547,
5
+ "train_samples": 817,
6
+ "train_samples_per_second": 0.247,
7
+ "train_steps_per_second": 0.016
8
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "eos_token_id": [
4
+ 151645,
5
+ 151643
6
+ ],
7
+ "pad_token_id": 151643,
8
+ "transformers_version": "4.49.0"
9
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 6.364145551230894e+17,
3
+ "train_loss": 1.0789901279486143,
4
+ "train_runtime": 4151.3547,
5
+ "train_samples": 817,
6
+ "train_samples_per_second": 0.247,
7
+ "train_steps_per_second": 0.016
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 5.0,
5
+ "eval_steps": 500,
6
+ "global_step": 65,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.07692307692307693,
13
+ "grad_norm": 56.69625199712202,
14
+ "learning_rate": 7.142857142857143e-06,
15
+ "loss": 10.6721,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.15384615384615385,
20
+ "grad_norm": 55.20314035746543,
21
+ "learning_rate": 1.4285714285714285e-05,
22
+ "loss": 10.847,
23
+ "step": 2
24
+ },
25
+ {
26
+ "epoch": 0.23076923076923078,
27
+ "grad_norm": 62.29911555217105,
28
+ "learning_rate": 2.1428571428571428e-05,
29
+ "loss": 10.0456,
30
+ "step": 3
31
+ },
32
+ {
33
+ "epoch": 0.3076923076923077,
34
+ "grad_norm": 60.40866589945923,
35
+ "learning_rate": 2.857142857142857e-05,
36
+ "loss": 3.7411,
37
+ "step": 4
38
+ },
39
+ {
40
+ "epoch": 0.38461538461538464,
41
+ "grad_norm": 5.296024443977825,
42
+ "learning_rate": 3.571428571428572e-05,
43
+ "loss": 1.3917,
44
+ "step": 5
45
+ },
46
+ {
47
+ "epoch": 0.46153846153846156,
48
+ "grad_norm": 11.63499005319304,
49
+ "learning_rate": 4.2857142857142856e-05,
50
+ "loss": 1.1571,
51
+ "step": 6
52
+ },
53
+ {
54
+ "epoch": 0.5384615384615384,
55
+ "grad_norm": 2.310497639622062,
56
+ "learning_rate": 5e-05,
57
+ "loss": 1.0452,
58
+ "step": 7
59
+ },
60
+ {
61
+ "epoch": 0.6153846153846154,
62
+ "grad_norm": 1.6470093668171653,
63
+ "learning_rate": 4.913793103448276e-05,
64
+ "loss": 1.0123,
65
+ "step": 8
66
+ },
67
+ {
68
+ "epoch": 0.6923076923076923,
69
+ "grad_norm": 2.026871155602432,
70
+ "learning_rate": 4.827586206896552e-05,
71
+ "loss": 0.8787,
72
+ "step": 9
73
+ },
74
+ {
75
+ "epoch": 0.7692307692307693,
76
+ "grad_norm": 1.36441223391375,
77
+ "learning_rate": 4.741379310344828e-05,
78
+ "loss": 0.8673,
79
+ "step": 10
80
+ },
81
+ {
82
+ "epoch": 0.8461538461538461,
83
+ "grad_norm": 1.64152552079298,
84
+ "learning_rate": 4.655172413793104e-05,
85
+ "loss": 0.7986,
86
+ "step": 11
87
+ },
88
+ {
89
+ "epoch": 0.9230769230769231,
90
+ "grad_norm": 1.084291869382038,
91
+ "learning_rate": 4.5689655172413794e-05,
92
+ "loss": 0.7852,
93
+ "step": 12
94
+ },
95
+ {
96
+ "epoch": 1.0,
97
+ "grad_norm": 0.8244322351661075,
98
+ "learning_rate": 4.482758620689655e-05,
99
+ "loss": 0.7835,
100
+ "step": 13
101
+ },
102
+ {
103
+ "epoch": 1.0769230769230769,
104
+ "grad_norm": 0.8467579577588499,
105
+ "learning_rate": 4.396551724137931e-05,
106
+ "loss": 0.7841,
107
+ "step": 14
108
+ },
109
+ {
110
+ "epoch": 1.1538461538461537,
111
+ "grad_norm": 1.0394065154633032,
112
+ "learning_rate": 4.3103448275862066e-05,
113
+ "loss": 0.6965,
114
+ "step": 15
115
+ },
116
+ {
117
+ "epoch": 1.2307692307692308,
118
+ "grad_norm": 0.6303665611617261,
119
+ "learning_rate": 4.224137931034483e-05,
120
+ "loss": 0.692,
121
+ "step": 16
122
+ },
123
+ {
124
+ "epoch": 1.3076923076923077,
125
+ "grad_norm": 0.6650023019130861,
126
+ "learning_rate": 4.1379310344827587e-05,
127
+ "loss": 0.7196,
128
+ "step": 17
129
+ },
130
+ {
131
+ "epoch": 1.3846153846153846,
132
+ "grad_norm": 0.5849872999722573,
133
+ "learning_rate": 4.0517241379310344e-05,
134
+ "loss": 0.6763,
135
+ "step": 18
136
+ },
137
+ {
138
+ "epoch": 1.4615384615384617,
139
+ "grad_norm": 0.6568623192873284,
140
+ "learning_rate": 3.965517241379311e-05,
141
+ "loss": 0.6003,
142
+ "step": 19
143
+ },
144
+ {
145
+ "epoch": 1.5384615384615383,
146
+ "grad_norm": 0.6188950192790953,
147
+ "learning_rate": 3.8793103448275865e-05,
148
+ "loss": 0.698,
149
+ "step": 20
150
+ },
151
+ {
152
+ "epoch": 1.6153846153846154,
153
+ "grad_norm": 0.43937943678839847,
154
+ "learning_rate": 3.793103448275862e-05,
155
+ "loss": 0.587,
156
+ "step": 21
157
+ },
158
+ {
159
+ "epoch": 1.6923076923076923,
160
+ "grad_norm": 0.46861722120782073,
161
+ "learning_rate": 3.7068965517241385e-05,
162
+ "loss": 0.6261,
163
+ "step": 22
164
+ },
165
+ {
166
+ "epoch": 1.7692307692307692,
167
+ "grad_norm": 0.5938781657836611,
168
+ "learning_rate": 3.620689655172414e-05,
169
+ "loss": 0.7064,
170
+ "step": 23
171
+ },
172
+ {
173
+ "epoch": 1.8461538461538463,
174
+ "grad_norm": 0.40181396579561623,
175
+ "learning_rate": 3.53448275862069e-05,
176
+ "loss": 0.5901,
177
+ "step": 24
178
+ },
179
+ {
180
+ "epoch": 1.9230769230769231,
181
+ "grad_norm": 0.41241038369811467,
182
+ "learning_rate": 3.4482758620689657e-05,
183
+ "loss": 0.6272,
184
+ "step": 25
185
+ },
186
+ {
187
+ "epoch": 2.0,
188
+ "grad_norm": 0.5098875911597754,
189
+ "learning_rate": 3.3620689655172414e-05,
190
+ "loss": 0.6515,
191
+ "step": 26
192
+ },
193
+ {
194
+ "epoch": 2.076923076923077,
195
+ "grad_norm": 0.4339068791945304,
196
+ "learning_rate": 3.275862068965517e-05,
197
+ "loss": 0.5543,
198
+ "step": 27
199
+ },
200
+ {
201
+ "epoch": 2.1538461538461537,
202
+ "grad_norm": 0.5054494096764832,
203
+ "learning_rate": 3.1896551724137935e-05,
204
+ "loss": 0.5018,
205
+ "step": 28
206
+ },
207
+ {
208
+ "epoch": 2.230769230769231,
209
+ "grad_norm": 0.4238540025684798,
210
+ "learning_rate": 3.103448275862069e-05,
211
+ "loss": 0.6447,
212
+ "step": 29
213
+ },
214
+ {
215
+ "epoch": 2.3076923076923075,
216
+ "grad_norm": 0.338738261804734,
217
+ "learning_rate": 3.017241379310345e-05,
218
+ "loss": 0.5072,
219
+ "step": 30
220
+ },
221
+ {
222
+ "epoch": 2.3846153846153846,
223
+ "grad_norm": 0.38342740921195684,
224
+ "learning_rate": 2.9310344827586206e-05,
225
+ "loss": 0.5681,
226
+ "step": 31
227
+ },
228
+ {
229
+ "epoch": 2.4615384615384617,
230
+ "grad_norm": 0.36692692741060295,
231
+ "learning_rate": 2.844827586206897e-05,
232
+ "loss": 0.5098,
233
+ "step": 32
234
+ },
235
+ {
236
+ "epoch": 2.5384615384615383,
237
+ "grad_norm": 0.3649135699524806,
238
+ "learning_rate": 2.7586206896551727e-05,
239
+ "loss": 0.5079,
240
+ "step": 33
241
+ },
242
+ {
243
+ "epoch": 2.6153846153846154,
244
+ "grad_norm": 0.3761181644174631,
245
+ "learning_rate": 2.672413793103448e-05,
246
+ "loss": 0.495,
247
+ "step": 34
248
+ },
249
+ {
250
+ "epoch": 2.6923076923076925,
251
+ "grad_norm": 0.3417797037871458,
252
+ "learning_rate": 2.5862068965517244e-05,
253
+ "loss": 0.4813,
254
+ "step": 35
255
+ },
256
+ {
257
+ "epoch": 2.769230769230769,
258
+ "grad_norm": 0.40945158138753057,
259
+ "learning_rate": 2.5e-05,
260
+ "loss": 0.562,
261
+ "step": 36
262
+ },
263
+ {
264
+ "epoch": 2.8461538461538463,
265
+ "grad_norm": 0.3094047547298436,
266
+ "learning_rate": 2.413793103448276e-05,
267
+ "loss": 0.5303,
268
+ "step": 37
269
+ },
270
+ {
271
+ "epoch": 2.9230769230769234,
272
+ "grad_norm": 0.4296909197321008,
273
+ "learning_rate": 2.327586206896552e-05,
274
+ "loss": 0.5714,
275
+ "step": 38
276
+ },
277
+ {
278
+ "epoch": 3.0,
279
+ "grad_norm": 0.3729941423109703,
280
+ "learning_rate": 2.2413793103448276e-05,
281
+ "loss": 0.4989,
282
+ "step": 39
283
+ },
284
+ {
285
+ "epoch": 3.076923076923077,
286
+ "grad_norm": 0.32599584121247344,
287
+ "learning_rate": 2.1551724137931033e-05,
288
+ "loss": 0.4522,
289
+ "step": 40
290
+ },
291
+ {
292
+ "epoch": 3.1538461538461537,
293
+ "grad_norm": 0.36372367238403003,
294
+ "learning_rate": 2.0689655172413793e-05,
295
+ "loss": 0.4778,
296
+ "step": 41
297
+ },
298
+ {
299
+ "epoch": 3.230769230769231,
300
+ "grad_norm": 0.3972570731654902,
301
+ "learning_rate": 1.9827586206896554e-05,
302
+ "loss": 0.4447,
303
+ "step": 42
304
+ },
305
+ {
306
+ "epoch": 3.3076923076923075,
307
+ "grad_norm": 0.4012637330387787,
308
+ "learning_rate": 1.896551724137931e-05,
309
+ "loss": 0.4127,
310
+ "step": 43
311
+ },
312
+ {
313
+ "epoch": 3.3846153846153846,
314
+ "grad_norm": 0.3026808512455307,
315
+ "learning_rate": 1.810344827586207e-05,
316
+ "loss": 0.4089,
317
+ "step": 44
318
+ },
319
+ {
320
+ "epoch": 3.4615384615384617,
321
+ "grad_norm": 0.3511308932223884,
322
+ "learning_rate": 1.7241379310344828e-05,
323
+ "loss": 0.4866,
324
+ "step": 45
325
+ },
326
+ {
327
+ "epoch": 3.5384615384615383,
328
+ "grad_norm": 0.44325984348261416,
329
+ "learning_rate": 1.6379310344827585e-05,
330
+ "loss": 0.4831,
331
+ "step": 46
332
+ },
333
+ {
334
+ "epoch": 3.6153846153846154,
335
+ "grad_norm": 0.3193474058304498,
336
+ "learning_rate": 1.5517241379310346e-05,
337
+ "loss": 0.4396,
338
+ "step": 47
339
+ },
340
+ {
341
+ "epoch": 3.6923076923076925,
342
+ "grad_norm": 0.3366172034999065,
343
+ "learning_rate": 1.4655172413793103e-05,
344
+ "loss": 0.451,
345
+ "step": 48
346
+ },
347
+ {
348
+ "epoch": 3.769230769230769,
349
+ "grad_norm": 0.3192724937483484,
350
+ "learning_rate": 1.3793103448275863e-05,
351
+ "loss": 0.3647,
352
+ "step": 49
353
+ },
354
+ {
355
+ "epoch": 3.8461538461538463,
356
+ "grad_norm": 0.41141681100708327,
357
+ "learning_rate": 1.2931034482758622e-05,
358
+ "loss": 0.4031,
359
+ "step": 50
360
+ },
361
+ {
362
+ "epoch": 3.9230769230769234,
363
+ "grad_norm": 0.32878139231790354,
364
+ "learning_rate": 1.206896551724138e-05,
365
+ "loss": 0.4331,
366
+ "step": 51
367
+ },
368
+ {
369
+ "epoch": 4.0,
370
+ "grad_norm": 0.2514182705601677,
371
+ "learning_rate": 1.1206896551724138e-05,
372
+ "loss": 0.4041,
373
+ "step": 52
374
+ },
375
+ {
376
+ "epoch": 4.076923076923077,
377
+ "grad_norm": 0.30360346561484663,
378
+ "learning_rate": 1.0344827586206897e-05,
379
+ "loss": 0.4296,
380
+ "step": 53
381
+ },
382
+ {
383
+ "epoch": 4.153846153846154,
384
+ "grad_norm": 0.37730490335834466,
385
+ "learning_rate": 9.482758620689655e-06,
386
+ "loss": 0.3607,
387
+ "step": 54
388
+ },
389
+ {
390
+ "epoch": 4.230769230769231,
391
+ "grad_norm": 0.26735234806360975,
392
+ "learning_rate": 8.620689655172414e-06,
393
+ "loss": 0.3805,
394
+ "step": 55
395
+ },
396
+ {
397
+ "epoch": 4.3076923076923075,
398
+ "grad_norm": 0.2666130294253567,
399
+ "learning_rate": 7.758620689655173e-06,
400
+ "loss": 0.3682,
401
+ "step": 56
402
+ },
403
+ {
404
+ "epoch": 4.384615384615385,
405
+ "grad_norm": 0.30258601083800113,
406
+ "learning_rate": 6.896551724137932e-06,
407
+ "loss": 0.3824,
408
+ "step": 57
409
+ },
410
+ {
411
+ "epoch": 4.461538461538462,
412
+ "grad_norm": 0.3051670708166745,
413
+ "learning_rate": 6.03448275862069e-06,
414
+ "loss": 0.3327,
415
+ "step": 58
416
+ },
417
+ {
418
+ "epoch": 4.538461538461538,
419
+ "grad_norm": 0.37192436505550563,
420
+ "learning_rate": 5.172413793103448e-06,
421
+ "loss": 0.4074,
422
+ "step": 59
423
+ },
424
+ {
425
+ "epoch": 4.615384615384615,
426
+ "grad_norm": 0.26152453728943026,
427
+ "learning_rate": 4.310344827586207e-06,
428
+ "loss": 0.3992,
429
+ "step": 60
430
+ },
431
+ {
432
+ "epoch": 4.6923076923076925,
433
+ "grad_norm": 0.25734721330237487,
434
+ "learning_rate": 3.448275862068966e-06,
435
+ "loss": 0.4249,
436
+ "step": 61
437
+ },
438
+ {
439
+ "epoch": 4.769230769230769,
440
+ "grad_norm": 0.23907794412322864,
441
+ "learning_rate": 2.586206896551724e-06,
442
+ "loss": 0.3945,
443
+ "step": 62
444
+ },
445
+ {
446
+ "epoch": 4.846153846153846,
447
+ "grad_norm": 0.2511817058634514,
448
+ "learning_rate": 1.724137931034483e-06,
449
+ "loss": 0.3262,
450
+ "step": 63
451
+ },
452
+ {
453
+ "epoch": 4.923076923076923,
454
+ "grad_norm": 0.25996184570432856,
455
+ "learning_rate": 8.620689655172415e-07,
456
+ "loss": 0.3407,
457
+ "step": 64
458
+ },
459
+ {
460
+ "epoch": 5.0,
461
+ "grad_norm": 0.25930270839584474,
462
+ "learning_rate": 0.0,
463
+ "loss": 0.3129,
464
+ "step": 65
465
+ },
466
+ {
467
+ "epoch": 5.0,
468
+ "step": 65,
469
+ "total_flos": 6.364145551230894e+17,
470
+ "train_loss": 1.0789901279486143,
471
+ "train_runtime": 4151.3547,
472
+ "train_samples_per_second": 0.247,
473
+ "train_steps_per_second": 0.016
474
+ }
475
+ ],
476
+ "logging_steps": 1,
477
+ "max_steps": 65,
478
+ "num_input_tokens_seen": 0,
479
+ "num_train_epochs": 5,
480
+ "save_steps": 500,
481
+ "stateful_callbacks": {
482
+ "TrainerControl": {
483
+ "args": {
484
+ "should_epoch_stop": false,
485
+ "should_evaluate": false,
486
+ "should_log": false,
487
+ "should_save": true,
488
+ "should_training_stop": true
489
+ },
490
+ "attributes": {}
491
+ }
492
+ },
493
+ "total_flos": 6.364145551230894e+17,
494
+ "train_batch_size": 1,
495
+ "trial_name": null,
496
+ "trial_params": null
497
+ }