pvbhanuteja commited on
Commit
fcb9999
·
verified ·
1 Parent(s): 6ad77b8

Model save

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-3-12b-it
3
+ library_name: transformers
4
+ model_name: gemma-3-12b-it-sft
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for gemma-3-12b-it-sft
13
+
14
+ This model is a fine-tuned version of [google/gemma-3-12b-it](https://huggingface.co/google/gemma-3-12b-it).
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="pvbhanuteja/gemma-3-12b-it-sft", 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/pvbhanuteja/sft-dynamic-graphs/runs/xzmeuen4)
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": 1.1360204825667672e+20,
3
+ "train_loss": 0.6426609048312512,
4
+ "train_runtime": 119967.1502,
5
+ "train_samples": 257572,
6
+ "train_samples_per_second": 2.147,
7
+ "train_steps_per_second": 0.004
8
+ }
generation_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 2,
3
+ "cache_implementation": "hybrid",
4
+ "do_sample": true,
5
+ "eos_token_id": [
6
+ 1,
7
+ 106
8
+ ],
9
+ "pad_token_id": 0,
10
+ "top_k": 64,
11
+ "top_p": 0.95,
12
+ "transformers_version": "4.51.2"
13
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 1.1360204825667672e+20,
3
+ "train_loss": 0.6426609048312512,
4
+ "train_runtime": 119967.1502,
5
+ "train_samples": 257572,
6
+ "train_samples_per_second": 2.147,
7
+ "train_steps_per_second": 0.004
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,444 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 0.9998447060285119,
6
+ "eval_steps": 500,
7
+ "global_step": 503,
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.019877628350467434,
14
+ "grad_norm": 49.489271990521864,
15
+ "learning_rate": 1.730769230769231e-05,
16
+ "loss": 18.2674,
17
+ "num_tokens": 35435900.0,
18
+ "step": 10
19
+ },
20
+ {
21
+ "epoch": 0.03975525670093487,
22
+ "grad_norm": 94.13839060488317,
23
+ "learning_rate": 3.653846153846154e-05,
24
+ "loss": 6.0352,
25
+ "num_tokens": 70986000.0,
26
+ "step": 20
27
+ },
28
+ {
29
+ "epoch": 0.0596328850514023,
30
+ "grad_norm": 36.22989263913226,
31
+ "learning_rate": 4.999560818649105e-05,
32
+ "loss": 2.257,
33
+ "num_tokens": 106406261.0,
34
+ "step": 30
35
+ },
36
+ {
37
+ "epoch": 0.07951051340186974,
38
+ "grad_norm": 12.381662510455556,
39
+ "learning_rate": 4.99175791880267e-05,
40
+ "loss": 1.6806,
41
+ "num_tokens": 142007549.0,
42
+ "step": 40
43
+ },
44
+ {
45
+ "epoch": 0.09938814175233718,
46
+ "grad_norm": 6.078747336589003,
47
+ "learning_rate": 4.9742343823849924e-05,
48
+ "loss": 1.6283,
49
+ "num_tokens": 177749958.0,
50
+ "step": 50
51
+ },
52
+ {
53
+ "epoch": 0.1192657701028046,
54
+ "grad_norm": 45.316378371707856,
55
+ "learning_rate": 4.947066194375331e-05,
56
+ "loss": 1.405,
57
+ "num_tokens": 213223619.0,
58
+ "step": 60
59
+ },
60
+ {
61
+ "epoch": 0.13914339845327203,
62
+ "grad_norm": 4.457640477421176,
63
+ "learning_rate": 4.910371160572305e-05,
64
+ "loss": 1.4731,
65
+ "num_tokens": 248699816.0,
66
+ "step": 70
67
+ },
68
+ {
69
+ "epoch": 0.15902102680373947,
70
+ "grad_norm": 3.8571852421472106,
71
+ "learning_rate": 4.864308396768294e-05,
72
+ "loss": 1.1962,
73
+ "num_tokens": 284242373.0,
74
+ "step": 80
75
+ },
76
+ {
77
+ "epoch": 0.17889865515420691,
78
+ "grad_norm": 2.922271088762262,
79
+ "learning_rate": 4.8090776387967915e-05,
80
+ "loss": 1.1482,
81
+ "num_tokens": 319801798.0,
82
+ "step": 90
83
+ },
84
+ {
85
+ "epoch": 0.19877628350467436,
86
+ "grad_norm": 3.07929680688637,
87
+ "learning_rate": 4.7449183764444924e-05,
88
+ "loss": 1.1573,
89
+ "num_tokens": 355227417.0,
90
+ "step": 100
91
+ },
92
+ {
93
+ "epoch": 0.2186539118551418,
94
+ "grad_norm": 2.986142143054458,
95
+ "learning_rate": 4.672108814983597e-05,
96
+ "loss": 1.1133,
97
+ "num_tokens": 35532164.0,
98
+ "step": 110
99
+ },
100
+ {
101
+ "epoch": 0.2385315402056092,
102
+ "grad_norm": 2.347646077232914,
103
+ "learning_rate": 4.590964668827306e-05,
104
+ "loss": 1.1624,
105
+ "num_tokens": 71080907.0,
106
+ "step": 120
107
+ },
108
+ {
109
+ "epoch": 0.25840916855607665,
110
+ "grad_norm": 3.077510825746025,
111
+ "learning_rate": 4.501837792539419e-05,
112
+ "loss": 1.0658,
113
+ "num_tokens": 106602450.0,
114
+ "step": 130
115
+ },
116
+ {
117
+ "epoch": 0.27828679690654406,
118
+ "grad_norm": 1.7347828183409042,
119
+ "learning_rate": 4.4051146551342136e-05,
120
+ "loss": 1.0483,
121
+ "num_tokens": 142169486.0,
122
+ "step": 140
123
+ },
124
+ {
125
+ "epoch": 0.29816442525701153,
126
+ "grad_norm": 2.802057431831608,
127
+ "learning_rate": 4.301214664282277e-05,
128
+ "loss": 1.0333,
129
+ "num_tokens": 177675215.0,
130
+ "step": 150
131
+ },
132
+ {
133
+ "epoch": 0.31804205360747895,
134
+ "grad_norm": 2.268188963759059,
135
+ "learning_rate": 4.190588347688833e-05,
136
+ "loss": 1.0238,
137
+ "num_tokens": 213190309.0,
138
+ "step": 160
139
+ },
140
+ {
141
+ "epoch": 0.3379196819579464,
142
+ "grad_norm": 1.6440471046115712,
143
+ "learning_rate": 4.073715399530405e-05,
144
+ "loss": 0.9957,
145
+ "num_tokens": 248802333.0,
146
+ "step": 170
147
+ },
148
+ {
149
+ "epoch": 0.35779731030841383,
150
+ "grad_norm": 1.3717651355528624,
151
+ "learning_rate": 3.9511026004207795e-05,
152
+ "loss": 0.9574,
153
+ "num_tokens": 284367601.0,
154
+ "step": 180
155
+ },
156
+ {
157
+ "epoch": 0.37767493865888124,
158
+ "grad_norm": 1.6711348270758677,
159
+ "learning_rate": 3.823281619925673e-05,
160
+ "loss": 0.9611,
161
+ "num_tokens": 319996464.0,
162
+ "step": 190
163
+ },
164
+ {
165
+ "epoch": 0.3975525670093487,
166
+ "grad_norm": 1.8188583401200056,
167
+ "learning_rate": 3.69080671115473e-05,
168
+ "loss": 0.9318,
169
+ "num_tokens": 355585930.0,
170
+ "step": 200
171
+ },
172
+ {
173
+ "epoch": 0.4174301953598161,
174
+ "grad_norm": 1.6314158389343252,
175
+ "learning_rate": 3.554252307427526e-05,
176
+ "loss": 0.9428,
177
+ "num_tokens": 391200376.0,
178
+ "step": 210
179
+ },
180
+ {
181
+ "epoch": 0.4373078237102836,
182
+ "grad_norm": 1.406291241468206,
183
+ "learning_rate": 3.414210531434781e-05,
184
+ "loss": 0.934,
185
+ "num_tokens": 426715690.0,
186
+ "step": 220
187
+ },
188
+ {
189
+ "epoch": 0.457185452060751,
190
+ "grad_norm": 1.5568298850166404,
191
+ "learning_rate": 3.271288627695541e-05,
192
+ "loss": 0.8906,
193
+ "num_tokens": 462193838.0,
194
+ "step": 230
195
+ },
196
+ {
197
+ "epoch": 0.4770630804112184,
198
+ "grad_norm": 1.6374375121178215,
199
+ "learning_rate": 3.126106329443562e-05,
200
+ "loss": 0.8869,
201
+ "num_tokens": 497775413.0,
202
+ "step": 240
203
+ },
204
+ {
205
+ "epoch": 0.4969407087616859,
206
+ "grad_norm": 1.4278396281710222,
207
+ "learning_rate": 2.9792931713605558e-05,
208
+ "loss": 0.8715,
209
+ "num_tokens": 533288808.0,
210
+ "step": 250
211
+ },
212
+ {
213
+ "epoch": 0.5168183371121533,
214
+ "grad_norm": 1.3315422073102914,
215
+ "learning_rate": 2.831485759808712e-05,
216
+ "loss": 0.8535,
217
+ "num_tokens": 568733244.0,
218
+ "step": 260
219
+ },
220
+ {
221
+ "epoch": 0.5366959654626208,
222
+ "grad_norm": 1.4292589501021156,
223
+ "learning_rate": 2.683325012399241e-05,
224
+ "loss": 0.8555,
225
+ "num_tokens": 604337940.0,
226
+ "step": 270
227
+ },
228
+ {
229
+ "epoch": 0.5565735938130881,
230
+ "grad_norm": 1.3191036037659456,
231
+ "learning_rate": 2.5354533788666173e-05,
232
+ "loss": 0.8258,
233
+ "num_tokens": 639897455.0,
234
+ "step": 280
235
+ },
236
+ {
237
+ "epoch": 0.5764512221635556,
238
+ "grad_norm": 1.2135834698476922,
239
+ "learning_rate": 2.388512055299283e-05,
240
+ "loss": 0.8152,
241
+ "num_tokens": 675560731.0,
242
+ "step": 290
243
+ },
244
+ {
245
+ "epoch": 0.5963288505140231,
246
+ "grad_norm": 1.1849646162622842,
247
+ "learning_rate": 2.2431382038063615e-05,
248
+ "loss": 0.8033,
249
+ "num_tokens": 710895149.0,
250
+ "step": 300
251
+ },
252
+ {
253
+ "epoch": 0.6162064788644904,
254
+ "grad_norm": 1.0526968604787708,
255
+ "learning_rate": 2.0999621896763955e-05,
256
+ "loss": 0.7823,
257
+ "num_tokens": 746372135.0,
258
+ "step": 310
259
+ },
260
+ {
261
+ "epoch": 0.6360841072149579,
262
+ "grad_norm": 1.0814389110808431,
263
+ "learning_rate": 1.959604848008217e-05,
264
+ "loss": 0.7653,
265
+ "num_tokens": 781964693.0,
266
+ "step": 320
267
+ },
268
+ {
269
+ "epoch": 0.6559617355654254,
270
+ "grad_norm": 1.1579079388621223,
271
+ "learning_rate": 1.8226747916663184e-05,
272
+ "loss": 0.7535,
273
+ "num_tokens": 817483499.0,
274
+ "step": 330
275
+ },
276
+ {
277
+ "epoch": 0.6758393639158928,
278
+ "grad_norm": 1.0764253018415963,
279
+ "learning_rate": 1.6897657722338715e-05,
280
+ "loss": 0.7417,
281
+ "num_tokens": 853175363.0,
282
+ "step": 340
283
+ },
284
+ {
285
+ "epoch": 0.6957169922663602,
286
+ "grad_norm": 1.0645270530767825,
287
+ "learning_rate": 1.561454105406746e-05,
288
+ "loss": 0.7284,
289
+ "num_tokens": 888676759.0,
290
+ "step": 350
291
+ },
292
+ {
293
+ "epoch": 0.7155946206168277,
294
+ "grad_norm": 1.0991349699273438,
295
+ "learning_rate": 1.4382961719924382e-05,
296
+ "loss": 0.7102,
297
+ "num_tokens": 924126537.0,
298
+ "step": 360
299
+ },
300
+ {
301
+ "epoch": 0.7354722489672951,
302
+ "grad_norm": 1.096361260557103,
303
+ "learning_rate": 1.3208260053500118e-05,
304
+ "loss": 0.7016,
305
+ "num_tokens": 959627625.0,
306
+ "step": 370
307
+ },
308
+ {
309
+ "epoch": 0.7553498773177625,
310
+ "grad_norm": 1.2001309900905168,
311
+ "learning_rate": 1.2095529757323018e-05,
312
+ "loss": 0.6735,
313
+ "num_tokens": 995276803.0,
314
+ "step": 380
315
+ },
316
+ {
317
+ "epoch": 0.77522750566823,
318
+ "grad_norm": 1.0243664466225824,
319
+ "learning_rate": 1.104959581571463e-05,
320
+ "loss": 0.6649,
321
+ "num_tokens": 1030735793.0,
322
+ "step": 390
323
+ },
324
+ {
325
+ "epoch": 0.7951051340186974,
326
+ "grad_norm": 1.4526878564718964,
327
+ "learning_rate": 1.0074993572852243e-05,
328
+ "loss": 0.6713,
329
+ "num_tokens": 1066374499.0,
330
+ "step": 400
331
+ },
332
+ {
333
+ "epoch": 0.8149827623691648,
334
+ "grad_norm": 1.050605567010305,
335
+ "learning_rate": 9.175949066759368e-06,
336
+ "loss": 0.6419,
337
+ "num_tokens": 1101855303.0,
338
+ "step": 410
339
+ },
340
+ {
341
+ "epoch": 0.8348603907196323,
342
+ "grad_norm": 1.125778801254232,
343
+ "learning_rate": 8.356360704499399e-06,
344
+ "loss": 0.635,
345
+ "num_tokens": 1137354673.0,
346
+ "step": 420
347
+ },
348
+ {
349
+ "epoch": 0.8547380190700997,
350
+ "grad_norm": 1.1832572011409386,
351
+ "learning_rate": 7.619782358031821e-06,
352
+ "loss": 0.6267,
353
+ "num_tokens": 1172860263.0,
354
+ "step": 430
355
+ },
356
+ {
357
+ "epoch": 0.8746156474205672,
358
+ "grad_norm": 1.1054714685819218,
359
+ "learning_rate": 6.969407954030057e-06,
360
+ "loss": 0.6116,
361
+ "num_tokens": 1208508537.0,
362
+ "step": 440
363
+ },
364
+ {
365
+ "epoch": 0.8944932757710345,
366
+ "grad_norm": 1.089754156750933,
367
+ "learning_rate": 6.40805762448228e-06,
368
+ "loss": 0.6051,
369
+ "num_tokens": 1244052723.0,
370
+ "step": 450
371
+ },
372
+ {
373
+ "epoch": 0.914370904121502,
374
+ "grad_norm": 1.0612130068358916,
375
+ "learning_rate": 5.938165478128298e-06,
376
+ "loss": 0.591,
377
+ "num_tokens": 1279456435.0,
378
+ "step": 460
379
+ },
380
+ {
381
+ "epoch": 0.9342485324719695,
382
+ "grad_norm": 1.1570486650093461,
383
+ "learning_rate": 5.5617690457577016e-06,
384
+ "loss": 0.5808,
385
+ "num_tokens": 1314958319.0,
386
+ "step": 470
387
+ },
388
+ {
389
+ "epoch": 0.9541261608224368,
390
+ "grad_norm": 1.4354838420805704,
391
+ "learning_rate": 5.280500445136247e-06,
392
+ "loss": 0.5754,
393
+ "num_tokens": 1350578878.0,
394
+ "step": 480
395
+ },
396
+ {
397
+ "epoch": 0.9740037891729043,
398
+ "grad_norm": 1.3310227594903838,
399
+ "learning_rate": 5.095579303870732e-06,
400
+ "loss": 0.5693,
401
+ "num_tokens": 1386062688.0,
402
+ "step": 490
403
+ },
404
+ {
405
+ "epoch": 0.9938814175233718,
406
+ "grad_norm": 1.0908684710720695,
407
+ "learning_rate": 5.007807470900112e-06,
408
+ "loss": 0.5606,
409
+ "num_tokens": 1421565738.0,
410
+ "step": 500
411
+ },
412
+ {
413
+ "epoch": 0.9998447060285119,
414
+ "num_tokens": 1432289557.0,
415
+ "step": 503,
416
+ "total_flos": 1.1360204825667672e+20,
417
+ "train_loss": 0.6426609048312512,
418
+ "train_runtime": 119967.1502,
419
+ "train_samples_per_second": 2.147,
420
+ "train_steps_per_second": 0.004
421
+ }
422
+ ],
423
+ "logging_steps": 10,
424
+ "max_steps": 503,
425
+ "num_input_tokens_seen": 0,
426
+ "num_train_epochs": 1,
427
+ "save_steps": 100,
428
+ "stateful_callbacks": {
429
+ "TrainerControl": {
430
+ "args": {
431
+ "should_epoch_stop": false,
432
+ "should_evaluate": false,
433
+ "should_log": false,
434
+ "should_save": true,
435
+ "should_training_stop": true
436
+ },
437
+ "attributes": {}
438
+ }
439
+ },
440
+ "total_flos": 1.1360204825667672e+20,
441
+ "train_batch_size": 1,
442
+ "trial_name": null,
443
+ "trial_params": null
444
+ }