Lansechen commited on
Commit
3f93228
·
verified ·
1 Parent(s): 7d490f3

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-3B-Instruct
3
+ library_name: transformers
4
+ model_name: Qwen2.5-3B-Instruct-Distill-bs17k-batch32-epoch3-8192
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen2.5-3B-Instruct-Distill-bs17k-batch32-epoch3-8192
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="Lansechen/Qwen2.5-3B-Instruct-Distill-bs17k-batch32-epoch3-8192", 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/chenran1995-the-chinese-university-of-hong-kong/huggingface/runs/c2cu3duq)
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+cu121
40
+ - Datasets: 3.3.1
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": 383335494844416.0,
3
+ "train_loss": 0.6108051699305338,
4
+ "train_runtime": 6955.6722,
5
+ "train_samples": 16610,
6
+ "train_samples_per_second": 4.672,
7
+ "train_steps_per_second": 0.036
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": 383335494844416.0,
3
+ "train_loss": 0.6108051699305338,
4
+ "train_runtime": 6955.6722,
5
+ "train_samples": 16610,
6
+ "train_samples_per_second": 4.672,
7
+ "train_steps_per_second": 0.036
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.991150442477876,
5
+ "eval_steps": 500,
6
+ "global_step": 252,
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.058997050147492625,
13
+ "grad_norm": 2.2326040267944336,
14
+ "learning_rate": 1.923076923076923e-05,
15
+ "loss": 0.9779,
16
+ "mean_token_accuracy": 0.7360098913311959,
17
+ "step": 5
18
+ },
19
+ {
20
+ "epoch": 0.11799410029498525,
21
+ "grad_norm": 0.895714282989502,
22
+ "learning_rate": 3.846153846153846e-05,
23
+ "loss": 0.8643,
24
+ "mean_token_accuracy": 0.7512570098042488,
25
+ "step": 10
26
+ },
27
+ {
28
+ "epoch": 0.17699115044247787,
29
+ "grad_norm": 0.639182448387146,
30
+ "learning_rate": 4.9992225160291885e-05,
31
+ "loss": 0.7757,
32
+ "mean_token_accuracy": 0.7676257744431496,
33
+ "step": 15
34
+ },
35
+ {
36
+ "epoch": 0.2359882005899705,
37
+ "grad_norm": 0.476315975189209,
38
+ "learning_rate": 4.990481990931694e-05,
39
+ "loss": 0.74,
40
+ "mean_token_accuracy": 0.774705457687378,
41
+ "step": 20
42
+ },
43
+ {
44
+ "epoch": 0.2949852507374631,
45
+ "grad_norm": 0.4143844246864319,
46
+ "learning_rate": 4.9720669537317554e-05,
47
+ "loss": 0.7214,
48
+ "mean_token_accuracy": 0.7784379974007607,
49
+ "step": 25
50
+ },
51
+ {
52
+ "epoch": 0.35398230088495575,
53
+ "grad_norm": 0.3763030469417572,
54
+ "learning_rate": 4.944056921471231e-05,
55
+ "loss": 0.7044,
56
+ "mean_token_accuracy": 0.7822064161300659,
57
+ "step": 30
58
+ },
59
+ {
60
+ "epoch": 0.41297935103244837,
61
+ "grad_norm": 0.34689950942993164,
62
+ "learning_rate": 4.9065728428554405e-05,
63
+ "loss": 0.6841,
64
+ "mean_token_accuracy": 0.7874152660369873,
65
+ "step": 35
66
+ },
67
+ {
68
+ "epoch": 0.471976401179941,
69
+ "grad_norm": 0.332253098487854,
70
+ "learning_rate": 4.859776575990668e-05,
71
+ "loss": 0.6713,
72
+ "mean_token_accuracy": 0.7901755809783936,
73
+ "step": 40
74
+ },
75
+ {
76
+ "epoch": 0.5309734513274337,
77
+ "grad_norm": 0.33200857043266296,
78
+ "learning_rate": 4.8038701894728526e-05,
79
+ "loss": 0.6553,
80
+ "mean_token_accuracy": 0.7945165485143661,
81
+ "step": 45
82
+ },
83
+ {
84
+ "epoch": 0.5899705014749262,
85
+ "grad_norm": 0.3228710889816284,
86
+ "learning_rate": 4.7390950898453896e-05,
87
+ "loss": 0.6583,
88
+ "mean_token_accuracy": 0.7935768470168114,
89
+ "step": 50
90
+ },
91
+ {
92
+ "epoch": 0.6489675516224189,
93
+ "grad_norm": 0.34554317593574524,
94
+ "learning_rate": 4.665730979193731e-05,
95
+ "loss": 0.6575,
96
+ "mean_token_accuracy": 0.7934844985604286,
97
+ "step": 55
98
+ },
99
+ {
100
+ "epoch": 0.7079646017699115,
101
+ "grad_norm": 0.32089245319366455,
102
+ "learning_rate": 4.584094647377942e-05,
103
+ "loss": 0.6508,
104
+ "mean_token_accuracy": 0.795045793056488,
105
+ "step": 60
106
+ },
107
+ {
108
+ "epoch": 0.7669616519174042,
109
+ "grad_norm": 0.36928287148475647,
110
+ "learning_rate": 4.494538604118408e-05,
111
+ "loss": 0.649,
112
+ "mean_token_accuracy": 0.795442347228527,
113
+ "step": 65
114
+ },
115
+ {
116
+ "epoch": 0.8259587020648967,
117
+ "grad_norm": 0.3632085919380188,
118
+ "learning_rate": 4.3974495568414175e-05,
119
+ "loss": 0.6488,
120
+ "mean_token_accuracy": 0.795751303434372,
121
+ "step": 70
122
+ },
123
+ {
124
+ "epoch": 0.8849557522123894,
125
+ "grad_norm": 0.3389696776866913,
126
+ "learning_rate": 4.293246740857364e-05,
127
+ "loss": 0.6398,
128
+ "mean_token_accuracy": 0.7981088876724243,
129
+ "step": 75
130
+ },
131
+ {
132
+ "epoch": 0.943952802359882,
133
+ "grad_norm": 0.32345691323280334,
134
+ "learning_rate": 4.182380109081926e-05,
135
+ "loss": 0.6407,
136
+ "mean_token_accuracy": 0.7974872574210167,
137
+ "step": 80
138
+ },
139
+ {
140
+ "epoch": 1.0117994100294985,
141
+ "grad_norm": 0.7706670165061951,
142
+ "learning_rate": 4.065328389117115e-05,
143
+ "loss": 0.7546,
144
+ "mean_token_accuracy": 0.8011921731437125,
145
+ "step": 85
146
+ },
147
+ {
148
+ "epoch": 1.0707964601769913,
149
+ "grad_norm": 0.405765563249588,
150
+ "learning_rate": 3.9425970160818e-05,
151
+ "loss": 0.5884,
152
+ "mean_token_accuracy": 0.8105607956647873,
153
+ "step": 90
154
+ },
155
+ {
156
+ "epoch": 1.1297935103244838,
157
+ "grad_norm": 0.307887464761734,
158
+ "learning_rate": 3.814715950117856e-05,
159
+ "loss": 0.594,
160
+ "mean_token_accuracy": 0.808464927971363,
161
+ "step": 95
162
+ },
163
+ {
164
+ "epoch": 1.1887905604719764,
165
+ "grad_norm": 0.3324905037879944,
166
+ "learning_rate": 3.682237387996043e-05,
167
+ "loss": 0.5868,
168
+ "mean_token_accuracy": 0.8108821675181389,
169
+ "step": 100
170
+ },
171
+ {
172
+ "epoch": 1.247787610619469,
173
+ "grad_norm": 0.342385470867157,
174
+ "learning_rate": 3.545733378703032e-05,
175
+ "loss": 0.5885,
176
+ "mean_token_accuracy": 0.8102918788790703,
177
+ "step": 105
178
+ },
179
+ {
180
+ "epoch": 1.3067846607669615,
181
+ "grad_norm": 0.28968796133995056,
182
+ "learning_rate": 3.405793353305565e-05,
183
+ "loss": 0.5855,
184
+ "mean_token_accuracy": 0.8110313430428505,
185
+ "step": 110
186
+ },
187
+ {
188
+ "epoch": 1.3657817109144543,
189
+ "grad_norm": 0.372152715921402,
190
+ "learning_rate": 3.2630215797579524e-05,
191
+ "loss": 0.5919,
192
+ "mean_token_accuracy": 0.8090123891830444,
193
+ "step": 115
194
+ },
195
+ {
196
+ "epoch": 1.424778761061947,
197
+ "grad_norm": 0.2889751195907593,
198
+ "learning_rate": 3.1180345536431366e-05,
199
+ "loss": 0.5883,
200
+ "mean_token_accuracy": 0.8098931536078453,
201
+ "step": 120
202
+ },
203
+ {
204
+ "epoch": 1.4837758112094395,
205
+ "grad_norm": 0.3183657228946686,
206
+ "learning_rate": 2.971458336114263e-05,
207
+ "loss": 0.5791,
208
+ "mean_token_accuracy": 0.8125559493899346,
209
+ "step": 125
210
+ },
211
+ {
212
+ "epoch": 1.5427728613569323,
213
+ "grad_norm": 0.31042715907096863,
214
+ "learning_rate": 2.8239258505316425e-05,
215
+ "loss": 0.5852,
216
+ "mean_token_accuracy": 0.8108706936240196,
217
+ "step": 130
218
+ },
219
+ {
220
+ "epoch": 1.6017699115044248,
221
+ "grad_norm": 0.33204129338264465,
222
+ "learning_rate": 2.6760741494683584e-05,
223
+ "loss": 0.5746,
224
+ "mean_token_accuracy": 0.8140962585806847,
225
+ "step": 135
226
+ },
227
+ {
228
+ "epoch": 1.6607669616519174,
229
+ "grad_norm": 0.342929482460022,
230
+ "learning_rate": 2.5285416638857372e-05,
231
+ "loss": 0.575,
232
+ "mean_token_accuracy": 0.8141591981053352,
233
+ "step": 140
234
+ },
235
+ {
236
+ "epoch": 1.71976401179941,
237
+ "grad_norm": 0.3200264573097229,
238
+ "learning_rate": 2.3819654463568643e-05,
239
+ "loss": 0.574,
240
+ "mean_token_accuracy": 0.8143440678715705,
241
+ "step": 145
242
+ },
243
+ {
244
+ "epoch": 1.7787610619469025,
245
+ "grad_norm": 0.287501722574234,
246
+ "learning_rate": 2.2369784202420478e-05,
247
+ "loss": 0.5774,
248
+ "mean_token_accuracy": 0.8128512471914291,
249
+ "step": 150
250
+ },
251
+ {
252
+ "epoch": 1.8377581120943953,
253
+ "grad_norm": 0.2589595317840576,
254
+ "learning_rate": 2.0942066466944355e-05,
255
+ "loss": 0.5764,
256
+ "mean_token_accuracy": 0.8133013695478439,
257
+ "step": 155
258
+ },
259
+ {
260
+ "epoch": 1.896755162241888,
261
+ "grad_norm": 0.32855328917503357,
262
+ "learning_rate": 1.9542666212969686e-05,
263
+ "loss": 0.5767,
264
+ "mean_token_accuracy": 0.8132460281252861,
265
+ "step": 160
266
+ },
267
+ {
268
+ "epoch": 1.9557522123893807,
269
+ "grad_norm": 0.26567938923835754,
270
+ "learning_rate": 1.817762612003957e-05,
271
+ "loss": 0.5783,
272
+ "mean_token_accuracy": 0.8122945606708527,
273
+ "step": 165
274
+ },
275
+ {
276
+ "epoch": 2.023598820058997,
277
+ "grad_norm": 0.3464497923851013,
278
+ "learning_rate": 1.685284049882144e-05,
279
+ "loss": 0.6753,
280
+ "mean_token_accuracy": 0.8177848967110238,
281
+ "step": 170
282
+ },
283
+ {
284
+ "epoch": 2.0825958702064895,
285
+ "grad_norm": 0.3261229395866394,
286
+ "learning_rate": 1.5574029839182002e-05,
287
+ "loss": 0.5317,
288
+ "mean_token_accuracy": 0.8253509551286697,
289
+ "step": 175
290
+ },
291
+ {
292
+ "epoch": 2.1415929203539825,
293
+ "grad_norm": 0.2763068377971649,
294
+ "learning_rate": 1.4346716108828856e-05,
295
+ "loss": 0.5282,
296
+ "mean_token_accuracy": 0.8263520315289498,
297
+ "step": 180
298
+ },
299
+ {
300
+ "epoch": 2.200589970501475,
301
+ "grad_norm": 0.2966022193431854,
302
+ "learning_rate": 1.3176198909180748e-05,
303
+ "loss": 0.53,
304
+ "mean_token_accuracy": 0.8254068896174431,
305
+ "step": 185
306
+ },
307
+ {
308
+ "epoch": 2.2595870206489677,
309
+ "grad_norm": 0.2522096633911133,
310
+ "learning_rate": 1.2067532591426361e-05,
311
+ "loss": 0.5294,
312
+ "mean_token_accuracy": 0.8256875559687614,
313
+ "step": 190
314
+ },
315
+ {
316
+ "epoch": 2.3185840707964602,
317
+ "grad_norm": 0.23973774909973145,
318
+ "learning_rate": 1.1025504431585829e-05,
319
+ "loss": 0.5343,
320
+ "mean_token_accuracy": 0.8240553349256515,
321
+ "step": 195
322
+ },
323
+ {
324
+ "epoch": 2.377581120943953,
325
+ "grad_norm": 0.2457086741924286,
326
+ "learning_rate": 1.0054613958815923e-05,
327
+ "loss": 0.5311,
328
+ "mean_token_accuracy": 0.825106480717659,
329
+ "step": 200
330
+ },
331
+ {
332
+ "epoch": 2.4365781710914454,
333
+ "grad_norm": 0.23020589351654053,
334
+ "learning_rate": 9.159053526220584e-06,
335
+ "loss": 0.5274,
336
+ "mean_token_accuracy": 0.8265491768717765,
337
+ "step": 205
338
+ },
339
+ {
340
+ "epoch": 2.495575221238938,
341
+ "grad_norm": 0.23255181312561035,
342
+ "learning_rate": 8.342690208062693e-06,
343
+ "loss": 0.5356,
344
+ "mean_token_accuracy": 0.8239412903785706,
345
+ "step": 210
346
+ },
347
+ {
348
+ "epoch": 2.554572271386431,
349
+ "grad_norm": 0.22837501764297485,
350
+ "learning_rate": 7.609049101546113e-06,
351
+ "loss": 0.5346,
352
+ "mean_token_accuracy": 0.8239208117127419,
353
+ "step": 215
354
+ },
355
+ {
356
+ "epoch": 2.613569321533923,
357
+ "grad_norm": 0.2300056517124176,
358
+ "learning_rate": 6.961298105271478e-06,
359
+ "loss": 0.531,
360
+ "mean_token_accuracy": 0.8248263359069824,
361
+ "step": 220
362
+ },
363
+ {
364
+ "epoch": 2.672566371681416,
365
+ "grad_norm": 0.22930695116519928,
366
+ "learning_rate": 6.40223424009332e-06,
367
+ "loss": 0.533,
368
+ "mean_token_accuracy": 0.8248327806591987,
369
+ "step": 225
370
+ },
371
+ {
372
+ "epoch": 2.7315634218289087,
373
+ "grad_norm": 0.20990419387817383,
374
+ "learning_rate": 5.934271571445601e-06,
375
+ "loss": 0.5287,
376
+ "mean_token_accuracy": 0.825985960662365,
377
+ "step": 230
378
+ },
379
+ {
380
+ "epoch": 2.7905604719764012,
381
+ "grad_norm": 0.22643804550170898,
382
+ "learning_rate": 5.559430785287692e-06,
383
+ "loss": 0.5322,
384
+ "mean_token_accuracy": 0.8249855458736419,
385
+ "step": 235
386
+ },
387
+ {
388
+ "epoch": 2.849557522123894,
389
+ "grad_norm": 0.21520549058914185,
390
+ "learning_rate": 5.279330462682451e-06,
391
+ "loss": 0.5316,
392
+ "mean_token_accuracy": 0.8252911075949669,
393
+ "step": 240
394
+ },
395
+ {
396
+ "epoch": 2.9085545722713864,
397
+ "grad_norm": 0.2218010574579239,
398
+ "learning_rate": 5.095180090683062e-06,
399
+ "loss": 0.5322,
400
+ "mean_token_accuracy": 0.8245415687561035,
401
+ "step": 245
402
+ },
403
+ {
404
+ "epoch": 2.967551622418879,
405
+ "grad_norm": 0.20834492146968842,
406
+ "learning_rate": 5.007774839708124e-06,
407
+ "loss": 0.5181,
408
+ "mean_token_accuracy": 0.8292100727558136,
409
+ "step": 250
410
+ },
411
+ {
412
+ "epoch": 2.991150442477876,
413
+ "mean_token_accuracy": 0.8264780156314373,
414
+ "step": 252,
415
+ "total_flos": 383335494844416.0,
416
+ "train_loss": 0.6108051699305338,
417
+ "train_runtime": 6955.6722,
418
+ "train_samples_per_second": 4.672,
419
+ "train_steps_per_second": 0.036
420
+ }
421
+ ],
422
+ "logging_steps": 5,
423
+ "max_steps": 252,
424
+ "num_input_tokens_seen": 0,
425
+ "num_train_epochs": 3,
426
+ "save_steps": 100,
427
+ "stateful_callbacks": {
428
+ "TrainerControl": {
429
+ "args": {
430
+ "should_epoch_stop": false,
431
+ "should_evaluate": false,
432
+ "should_log": false,
433
+ "should_save": true,
434
+ "should_training_stop": true
435
+ },
436
+ "attributes": {}
437
+ }
438
+ },
439
+ "total_flos": 383335494844416.0,
440
+ "train_batch_size": 4,
441
+ "trial_name": null,
442
+ "trial_params": null
443
+ }