lewtun HF Staff commited on
Commit
ad3737c
·
verified ·
1 Parent(s): 3a083d3

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: meta-llama/Llama-3.2-1B
3
+ library_name: transformers
4
+ model_name: Llama-3.2-1B-SFT-Capybara-No-Packing-Llama
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Llama-3.2-1B-SFT-Capybara-No-Packing-Llama
13
+
14
+ This model is a fine-tuned version of [meta-llama/Llama-3.2-1B](https://huggingface.co/meta-llama/Llama-3.2-1B).
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="lewtun/Llama-3.2-1B-SFT-Capybara-No-Packing-Llama", 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/huggingface/huggingface/runs/c583mpsv)
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.17.0.dev0
38
+ - Transformers: 4.51.2
39
+ - Pytorch: 2.6.0
40
+ - Datasets: 3.5.0
41
+ - Tokenizers: 0.21.1
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{\'e}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": 3.616736600517509e+17,
3
+ "train_loss": 1.2339729416754939,
4
+ "train_runtime": 268.4154,
5
+ "train_samples": 15806,
6
+ "train_samples_per_second": 117.773,
7
+ "train_steps_per_second": 0.924
8
+ }
generation_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 128000,
4
+ "do_sample": true,
5
+ "eos_token_id": 128001,
6
+ "temperature": 0.6,
7
+ "top_p": 0.9,
8
+ "transformers_version": "4.51.2"
9
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 3.616736600517509e+17,
3
+ "train_loss": 1.2339729416754939,
4
+ "train_runtime": 268.4154,
5
+ "train_samples": 15806,
6
+ "train_samples_per_second": 117.773,
7
+ "train_steps_per_second": 0.924
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,452 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 2.0,
6
+ "eval_steps": 100,
7
+ "global_step": 248,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.04032258064516129,
14
+ "grad_norm": 11.799724578857422,
15
+ "learning_rate": 1.967741935483871e-05,
16
+ "loss": 1.8639,
17
+ "num_tokens": 584580.0,
18
+ "step": 5
19
+ },
20
+ {
21
+ "epoch": 0.08064516129032258,
22
+ "grad_norm": 2.09053897857666,
23
+ "learning_rate": 1.9274193548387097e-05,
24
+ "loss": 1.5389,
25
+ "num_tokens": 1169428.0,
26
+ "step": 10
27
+ },
28
+ {
29
+ "epoch": 0.12096774193548387,
30
+ "grad_norm": 1.7200100421905518,
31
+ "learning_rate": 1.8870967741935487e-05,
32
+ "loss": 1.5317,
33
+ "num_tokens": 1770489.0,
34
+ "step": 15
35
+ },
36
+ {
37
+ "epoch": 0.16129032258064516,
38
+ "grad_norm": 1.7961115837097168,
39
+ "learning_rate": 1.8467741935483873e-05,
40
+ "loss": 1.5076,
41
+ "num_tokens": 2367303.0,
42
+ "step": 20
43
+ },
44
+ {
45
+ "epoch": 0.20161290322580644,
46
+ "grad_norm": 1.5970382690429688,
47
+ "learning_rate": 1.806451612903226e-05,
48
+ "loss": 1.4555,
49
+ "num_tokens": 2947847.0,
50
+ "step": 25
51
+ },
52
+ {
53
+ "epoch": 0.24193548387096775,
54
+ "grad_norm": 1.6028152704238892,
55
+ "learning_rate": 1.7661290322580645e-05,
56
+ "loss": 1.4162,
57
+ "num_tokens": 3547811.0,
58
+ "step": 30
59
+ },
60
+ {
61
+ "epoch": 0.28225806451612906,
62
+ "grad_norm": 1.4596558809280396,
63
+ "learning_rate": 1.7258064516129035e-05,
64
+ "loss": 1.3612,
65
+ "num_tokens": 4119060.0,
66
+ "step": 35
67
+ },
68
+ {
69
+ "epoch": 0.3225806451612903,
70
+ "grad_norm": 1.3425326347351074,
71
+ "learning_rate": 1.685483870967742e-05,
72
+ "loss": 1.414,
73
+ "num_tokens": 4727662.0,
74
+ "step": 40
75
+ },
76
+ {
77
+ "epoch": 0.3629032258064516,
78
+ "grad_norm": 1.271307110786438,
79
+ "learning_rate": 1.6451612903225807e-05,
80
+ "loss": 1.3948,
81
+ "num_tokens": 5318819.0,
82
+ "step": 45
83
+ },
84
+ {
85
+ "epoch": 0.4032258064516129,
86
+ "grad_norm": 1.2482575178146362,
87
+ "learning_rate": 1.6048387096774193e-05,
88
+ "loss": 1.3413,
89
+ "num_tokens": 5900929.0,
90
+ "step": 50
91
+ },
92
+ {
93
+ "epoch": 0.4435483870967742,
94
+ "grad_norm": 1.2999275922775269,
95
+ "learning_rate": 1.5645161290322583e-05,
96
+ "loss": 1.3457,
97
+ "num_tokens": 6476426.0,
98
+ "step": 55
99
+ },
100
+ {
101
+ "epoch": 0.4838709677419355,
102
+ "grad_norm": 1.4803128242492676,
103
+ "learning_rate": 1.5241935483870969e-05,
104
+ "loss": 1.3262,
105
+ "num_tokens": 7034593.0,
106
+ "step": 60
107
+ },
108
+ {
109
+ "epoch": 0.5241935483870968,
110
+ "grad_norm": 1.1995830535888672,
111
+ "learning_rate": 1.4838709677419357e-05,
112
+ "loss": 1.3028,
113
+ "num_tokens": 7645033.0,
114
+ "step": 65
115
+ },
116
+ {
117
+ "epoch": 0.5645161290322581,
118
+ "grad_norm": 2.7548296451568604,
119
+ "learning_rate": 1.4435483870967743e-05,
120
+ "loss": 1.314,
121
+ "num_tokens": 8220494.0,
122
+ "step": 70
123
+ },
124
+ {
125
+ "epoch": 0.6048387096774194,
126
+ "grad_norm": 1.3331153392791748,
127
+ "learning_rate": 1.4032258064516131e-05,
128
+ "loss": 1.2997,
129
+ "num_tokens": 8828117.0,
130
+ "step": 75
131
+ },
132
+ {
133
+ "epoch": 0.6451612903225806,
134
+ "grad_norm": 1.2527021169662476,
135
+ "learning_rate": 1.3629032258064517e-05,
136
+ "loss": 1.331,
137
+ "num_tokens": 9438365.0,
138
+ "step": 80
139
+ },
140
+ {
141
+ "epoch": 0.6854838709677419,
142
+ "grad_norm": 1.3447303771972656,
143
+ "learning_rate": 1.3225806451612903e-05,
144
+ "loss": 1.295,
145
+ "num_tokens": 10032986.0,
146
+ "step": 85
147
+ },
148
+ {
149
+ "epoch": 0.7258064516129032,
150
+ "grad_norm": 1.1974637508392334,
151
+ "learning_rate": 1.2822580645161291e-05,
152
+ "loss": 1.2876,
153
+ "num_tokens": 10621259.0,
154
+ "step": 90
155
+ },
156
+ {
157
+ "epoch": 0.7661290322580645,
158
+ "grad_norm": 1.3035883903503418,
159
+ "learning_rate": 1.2419354838709679e-05,
160
+ "loss": 1.2846,
161
+ "num_tokens": 11222906.0,
162
+ "step": 95
163
+ },
164
+ {
165
+ "epoch": 0.8064516129032258,
166
+ "grad_norm": 1.2527148723602295,
167
+ "learning_rate": 1.2016129032258067e-05,
168
+ "loss": 1.2915,
169
+ "step": 100
170
+ },
171
+ {
172
+ "epoch": 0.8064516129032258,
173
+ "eval_loss": 1.263860821723938,
174
+ "eval_num_tokens": 11815575.0,
175
+ "eval_runtime": 0.6219,
176
+ "eval_samples_per_second": 321.577,
177
+ "eval_steps_per_second": 6.432,
178
+ "step": 100
179
+ },
180
+ {
181
+ "epoch": 0.8467741935483871,
182
+ "grad_norm": 1.223354458808899,
183
+ "learning_rate": 1.1612903225806453e-05,
184
+ "loss": 1.2529,
185
+ "num_tokens": 12410628.0,
186
+ "step": 105
187
+ },
188
+ {
189
+ "epoch": 0.8870967741935484,
190
+ "grad_norm": 1.300518274307251,
191
+ "learning_rate": 1.1209677419354839e-05,
192
+ "loss": 1.3045,
193
+ "num_tokens": 12992321.0,
194
+ "step": 110
195
+ },
196
+ {
197
+ "epoch": 0.9274193548387096,
198
+ "grad_norm": 1.2451575994491577,
199
+ "learning_rate": 1.0806451612903225e-05,
200
+ "loss": 1.2933,
201
+ "num_tokens": 13582229.0,
202
+ "step": 115
203
+ },
204
+ {
205
+ "epoch": 0.967741935483871,
206
+ "grad_norm": 1.42113196849823,
207
+ "learning_rate": 1.0403225806451613e-05,
208
+ "loss": 1.2582,
209
+ "num_tokens": 14172667.0,
210
+ "step": 120
211
+ },
212
+ {
213
+ "epoch": 1.0080645161290323,
214
+ "grad_norm": 1.5717027187347412,
215
+ "learning_rate": 1e-05,
216
+ "loss": 1.2315,
217
+ "num_tokens": 14782591.0,
218
+ "step": 125
219
+ },
220
+ {
221
+ "epoch": 1.0483870967741935,
222
+ "grad_norm": 1.5194685459136963,
223
+ "learning_rate": 9.596774193548389e-06,
224
+ "loss": 1.1226,
225
+ "num_tokens": 15357942.0,
226
+ "step": 130
227
+ },
228
+ {
229
+ "epoch": 1.0887096774193548,
230
+ "grad_norm": 1.418308138847351,
231
+ "learning_rate": 9.193548387096775e-06,
232
+ "loss": 1.0846,
233
+ "num_tokens": 15945153.0,
234
+ "step": 135
235
+ },
236
+ {
237
+ "epoch": 1.129032258064516,
238
+ "grad_norm": 1.3308682441711426,
239
+ "learning_rate": 8.790322580645163e-06,
240
+ "loss": 1.133,
241
+ "num_tokens": 16533255.0,
242
+ "step": 140
243
+ },
244
+ {
245
+ "epoch": 1.1693548387096775,
246
+ "grad_norm": 1.1994943618774414,
247
+ "learning_rate": 8.387096774193549e-06,
248
+ "loss": 1.0632,
249
+ "num_tokens": 17123860.0,
250
+ "step": 145
251
+ },
252
+ {
253
+ "epoch": 1.2096774193548387,
254
+ "grad_norm": 1.1403435468673706,
255
+ "learning_rate": 7.983870967741935e-06,
256
+ "loss": 1.0878,
257
+ "num_tokens": 17705881.0,
258
+ "step": 150
259
+ },
260
+ {
261
+ "epoch": 1.25,
262
+ "grad_norm": 1.1773253679275513,
263
+ "learning_rate": 7.580645161290323e-06,
264
+ "loss": 1.0848,
265
+ "num_tokens": 18311747.0,
266
+ "step": 155
267
+ },
268
+ {
269
+ "epoch": 1.2903225806451613,
270
+ "grad_norm": 1.1357718706130981,
271
+ "learning_rate": 7.177419354838711e-06,
272
+ "loss": 1.0685,
273
+ "num_tokens": 18903969.0,
274
+ "step": 160
275
+ },
276
+ {
277
+ "epoch": 1.3306451612903225,
278
+ "grad_norm": 1.154196858406067,
279
+ "learning_rate": 6.774193548387097e-06,
280
+ "loss": 1.1077,
281
+ "num_tokens": 19486973.0,
282
+ "step": 165
283
+ },
284
+ {
285
+ "epoch": 1.370967741935484,
286
+ "grad_norm": 1.143140196800232,
287
+ "learning_rate": 6.370967741935485e-06,
288
+ "loss": 1.1272,
289
+ "num_tokens": 20083469.0,
290
+ "step": 170
291
+ },
292
+ {
293
+ "epoch": 1.4112903225806452,
294
+ "grad_norm": 1.1998040676116943,
295
+ "learning_rate": 5.967741935483872e-06,
296
+ "loss": 1.1137,
297
+ "num_tokens": 20660913.0,
298
+ "step": 175
299
+ },
300
+ {
301
+ "epoch": 1.4516129032258065,
302
+ "grad_norm": 1.155060887336731,
303
+ "learning_rate": 5.564516129032258e-06,
304
+ "loss": 1.1344,
305
+ "num_tokens": 21241019.0,
306
+ "step": 180
307
+ },
308
+ {
309
+ "epoch": 1.4919354838709677,
310
+ "grad_norm": 1.1472811698913574,
311
+ "learning_rate": 5.161290322580646e-06,
312
+ "loss": 1.081,
313
+ "num_tokens": 21850671.0,
314
+ "step": 185
315
+ },
316
+ {
317
+ "epoch": 1.532258064516129,
318
+ "grad_norm": 1.1946035623550415,
319
+ "learning_rate": 4.758064516129033e-06,
320
+ "loss": 1.0698,
321
+ "num_tokens": 22409894.0,
322
+ "step": 190
323
+ },
324
+ {
325
+ "epoch": 1.5725806451612905,
326
+ "grad_norm": 1.121880054473877,
327
+ "learning_rate": 4.35483870967742e-06,
328
+ "loss": 1.1139,
329
+ "num_tokens": 23009139.0,
330
+ "step": 195
331
+ },
332
+ {
333
+ "epoch": 1.6129032258064515,
334
+ "grad_norm": 1.166876196861267,
335
+ "learning_rate": 3.951612903225807e-06,
336
+ "loss": 1.0958,
337
+ "step": 200
338
+ },
339
+ {
340
+ "epoch": 1.6129032258064515,
341
+ "eval_loss": 1.2381997108459473,
342
+ "eval_num_tokens": 23571600.0,
343
+ "eval_runtime": 0.5704,
344
+ "eval_samples_per_second": 350.647,
345
+ "eval_steps_per_second": 7.013,
346
+ "step": 200
347
+ },
348
+ {
349
+ "epoch": 1.653225806451613,
350
+ "grad_norm": 1.0650382041931152,
351
+ "learning_rate": 3.548387096774194e-06,
352
+ "loss": 1.1124,
353
+ "num_tokens": 24153766.0,
354
+ "step": 205
355
+ },
356
+ {
357
+ "epoch": 1.6935483870967742,
358
+ "grad_norm": 1.1366987228393555,
359
+ "learning_rate": 3.145161290322581e-06,
360
+ "loss": 1.137,
361
+ "num_tokens": 24761611.0,
362
+ "step": 210
363
+ },
364
+ {
365
+ "epoch": 1.7338709677419355,
366
+ "grad_norm": 1.0956673622131348,
367
+ "learning_rate": 2.7419354838709676e-06,
368
+ "loss": 1.1278,
369
+ "num_tokens": 25370199.0,
370
+ "step": 215
371
+ },
372
+ {
373
+ "epoch": 1.7741935483870968,
374
+ "grad_norm": 1.0677380561828613,
375
+ "learning_rate": 2.338709677419355e-06,
376
+ "loss": 1.0614,
377
+ "num_tokens": 26001840.0,
378
+ "step": 220
379
+ },
380
+ {
381
+ "epoch": 1.814516129032258,
382
+ "grad_norm": 1.0645986795425415,
383
+ "learning_rate": 1.935483870967742e-06,
384
+ "loss": 1.0969,
385
+ "num_tokens": 26611726.0,
386
+ "step": 225
387
+ },
388
+ {
389
+ "epoch": 1.8548387096774195,
390
+ "grad_norm": 1.1630877256393433,
391
+ "learning_rate": 1.5322580645161292e-06,
392
+ "loss": 1.0922,
393
+ "num_tokens": 27185670.0,
394
+ "step": 230
395
+ },
396
+ {
397
+ "epoch": 1.8951612903225805,
398
+ "grad_norm": 1.1040847301483154,
399
+ "learning_rate": 1.1290322580645162e-06,
400
+ "loss": 1.1251,
401
+ "num_tokens": 27777551.0,
402
+ "step": 235
403
+ },
404
+ {
405
+ "epoch": 1.935483870967742,
406
+ "grad_norm": 1.1222697496414185,
407
+ "learning_rate": 7.258064516129033e-07,
408
+ "loss": 1.0816,
409
+ "num_tokens": 28376439.0,
410
+ "step": 240
411
+ },
412
+ {
413
+ "epoch": 1.9758064516129032,
414
+ "grad_norm": 1.0824819803237915,
415
+ "learning_rate": 3.2258064516129035e-07,
416
+ "loss": 1.0641,
417
+ "num_tokens": 28972576.0,
418
+ "step": 245
419
+ },
420
+ {
421
+ "epoch": 2.0,
422
+ "num_tokens": 29322439.0,
423
+ "step": 248,
424
+ "total_flos": 3.616736600517509e+17,
425
+ "train_loss": 1.2339729416754939,
426
+ "train_runtime": 268.4154,
427
+ "train_samples_per_second": 117.773,
428
+ "train_steps_per_second": 0.924
429
+ }
430
+ ],
431
+ "logging_steps": 5,
432
+ "max_steps": 248,
433
+ "num_input_tokens_seen": 0,
434
+ "num_train_epochs": 2,
435
+ "save_steps": 500,
436
+ "stateful_callbacks": {
437
+ "TrainerControl": {
438
+ "args": {
439
+ "should_epoch_stop": false,
440
+ "should_evaluate": false,
441
+ "should_log": false,
442
+ "should_save": true,
443
+ "should_training_stop": true
444
+ },
445
+ "attributes": {}
446
+ }
447
+ },
448
+ "total_flos": 3.616736600517509e+17,
449
+ "train_batch_size": 16,
450
+ "trial_name": null,
451
+ "trial_params": null
452
+ }