jonatatyska commited on
Commit
21ec3bc
·
verified ·
1 Parent(s): aba67e8

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-Math-SFT-completion-loss
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for Qwen2.5-3B-Math-SFT-completion-loss
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="jonatatyska/Qwen2.5-3B-Math-SFT-completion-loss", 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/ine-ufsc/huggingface/runs/x3b3s9ge)
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.18.0.dev0
38
+ - Transformers: 4.52.3
39
+ - Pytorch: 2.6.0
40
+ - Datasets: 3.6.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": 78851405905920.0,
3
+ "train_loss": 0.10361792713403702,
4
+ "train_runtime": 1333.4603,
5
+ "train_samples": 1600,
6
+ "train_samples_per_second": 119.989,
7
+ "train_steps_per_second": 0.15
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.52.3"
14
+ }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:79c2b6bbf91bb771b99ed78787e5ec2ed22e32c614b3b980c6235d6f61f04e33
3
  size 4957560304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:56d8cd8db239325cbcec4d90810e87de61108866252f05f0a9bc3edcba2655f9
3
  size 4957560304
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9a2c4bbdf4e16cf46ad53d5a6af115390c10302f8322e77ff04dbb10264e19ad
3
  size 1214366696
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e8ebd7f3dba7718d29cc8b4fd5f4d4e560924d996e5d559ef74cd86887f8670
3
  size 1214366696
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 78851405905920.0,
3
+ "train_loss": 0.10361792713403702,
4
+ "train_runtime": 1333.4603,
5
+ "train_samples": 1600,
6
+ "train_samples_per_second": 119.989,
7
+ "train_steps_per_second": 0.15
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 100.0,
6
+ "eval_steps": 500,
7
+ "global_step": 200,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 2.6153846153846154,
14
+ "grad_norm": 21.59720655622678,
15
+ "learning_rate": 4.9955601389636114e-05,
16
+ "loss": 1.3415,
17
+ "num_tokens": 565746.0,
18
+ "step": 5
19
+ },
20
+ {
21
+ "epoch": 5.0,
22
+ "grad_norm": 3.906927697853744,
23
+ "learning_rate": 4.977553229862255e-05,
24
+ "loss": 0.7847,
25
+ "num_tokens": 1086803.0,
26
+ "step": 10
27
+ },
28
+ {
29
+ "epoch": 7.615384615384615,
30
+ "grad_norm": 2.8447631460087446,
31
+ "learning_rate": 4.9458127143621816e-05,
32
+ "loss": 0.4604,
33
+ "num_tokens": 1656423.0,
34
+ "step": 15
35
+ },
36
+ {
37
+ "epoch": 10.0,
38
+ "grad_norm": 1.5736608387598903,
39
+ "learning_rate": 4.900534283296243e-05,
40
+ "loss": 0.2251,
41
+ "num_tokens": 2171710.0,
42
+ "step": 20
43
+ },
44
+ {
45
+ "epoch": 12.615384615384615,
46
+ "grad_norm": 1.3265252106537566,
47
+ "learning_rate": 4.841997093248566e-05,
48
+ "loss": 0.1174,
49
+ "num_tokens": 2739797.0,
50
+ "step": 25
51
+ },
52
+ {
53
+ "epoch": 15.0,
54
+ "grad_norm": 0.641536766679635,
55
+ "learning_rate": 4.770562045461385e-05,
56
+ "loss": 0.0834,
57
+ "num_tokens": 3258079.0,
58
+ "step": 30
59
+ },
60
+ {
61
+ "epoch": 17.615384615384617,
62
+ "grad_norm": 1.0021986252521704,
63
+ "learning_rate": 4.6866695607588737e-05,
64
+ "loss": 0.0636,
65
+ "num_tokens": 3826009.0,
66
+ "step": 35
67
+ },
68
+ {
69
+ "epoch": 20.0,
70
+ "grad_norm": 1.0579448550645079,
71
+ "learning_rate": 4.5908368642063024e-05,
72
+ "loss": 0.0549,
73
+ "num_tokens": 4343745.0,
74
+ "step": 40
75
+ },
76
+ {
77
+ "epoch": 22.615384615384617,
78
+ "grad_norm": 0.6755547941953502,
79
+ "learning_rate": 4.483654796245526e-05,
80
+ "loss": 0.0498,
81
+ "num_tokens": 4908350.0,
82
+ "step": 45
83
+ },
84
+ {
85
+ "epoch": 25.0,
86
+ "grad_norm": 0.282756393641905,
87
+ "learning_rate": 4.3657841699671745e-05,
88
+ "loss": 0.0412,
89
+ "num_tokens": 5427624.0,
90
+ "step": 50
91
+ },
92
+ {
93
+ "epoch": 27.615384615384617,
94
+ "grad_norm": 0.5155381315642291,
95
+ "learning_rate": 4.237951696978217e-05,
96
+ "loss": 0.0363,
97
+ "num_tokens": 5996555.0,
98
+ "step": 55
99
+ },
100
+ {
101
+ "epoch": 30.0,
102
+ "grad_norm": 0.3630924549012878,
103
+ "learning_rate": 4.100945506983239e-05,
104
+ "loss": 0.0352,
105
+ "num_tokens": 6513386.0,
106
+ "step": 60
107
+ },
108
+ {
109
+ "epoch": 32.61538461538461,
110
+ "grad_norm": 0.3042742442287128,
111
+ "learning_rate": 3.955610288702742e-05,
112
+ "loss": 0.033,
113
+ "num_tokens": 7079040.0,
114
+ "step": 65
115
+ },
116
+ {
117
+ "epoch": 35.0,
118
+ "grad_norm": 0.4632453006374779,
119
+ "learning_rate": 3.80284208208629e-05,
120
+ "loss": 0.0322,
121
+ "num_tokens": 7597639.0,
122
+ "step": 70
123
+ },
124
+ {
125
+ "epoch": 37.61538461538461,
126
+ "grad_norm": 0.27693841307856715,
127
+ "learning_rate": 3.643582753928256e-05,
128
+ "loss": 0.0318,
129
+ "num_tokens": 8162093.0,
130
+ "step": 75
131
+ },
132
+ {
133
+ "epoch": 40.0,
134
+ "grad_norm": 0.33251475565873645,
135
+ "learning_rate": 3.4788141909458366e-05,
136
+ "loss": 0.031,
137
+ "num_tokens": 8684102.0,
138
+ "step": 80
139
+ },
140
+ {
141
+ "epoch": 42.61538461538461,
142
+ "grad_norm": 0.3681264453666103,
143
+ "learning_rate": 3.309552246120924e-05,
144
+ "loss": 0.0311,
145
+ "num_tokens": 9251198.0,
146
+ "step": 85
147
+ },
148
+ {
149
+ "epoch": 45.0,
150
+ "grad_norm": 0.27124052590328984,
151
+ "learning_rate": 3.136840475628671e-05,
152
+ "loss": 0.031,
153
+ "num_tokens": 9770794.0,
154
+ "step": 90
155
+ },
156
+ {
157
+ "epoch": 47.61538461538461,
158
+ "grad_norm": 0.3625812149627033,
159
+ "learning_rate": 2.961743704966658e-05,
160
+ "loss": 0.0305,
161
+ "num_tokens": 10338422.0,
162
+ "step": 95
163
+ },
164
+ {
165
+ "epoch": 50.0,
166
+ "grad_norm": 0.2551638013276818,
167
+ "learning_rate": 2.785341463951597e-05,
168
+ "loss": 0.0305,
169
+ "num_tokens": 10856244.0,
170
+ "step": 100
171
+ },
172
+ {
173
+ "epoch": 52.61538461538461,
174
+ "grad_norm": 0.27255658533388527,
175
+ "learning_rate": 2.6087213310590453e-05,
176
+ "loss": 0.0305,
177
+ "num_tokens": 11422333.0,
178
+ "step": 105
179
+ },
180
+ {
181
+ "epoch": 55.0,
182
+ "grad_norm": 0.24315232941812684,
183
+ "learning_rate": 2.4329722281404395e-05,
184
+ "loss": 0.0304,
185
+ "num_tokens": 11940211.0,
186
+ "step": 110
187
+ },
188
+ {
189
+ "epoch": 57.61538461538461,
190
+ "grad_norm": 0.24273423843600006,
191
+ "learning_rate": 2.2591777068577803e-05,
192
+ "loss": 0.0301,
193
+ "num_tokens": 12506804.0,
194
+ "step": 115
195
+ },
196
+ {
197
+ "epoch": 60.0,
198
+ "grad_norm": 0.2057456424451167,
199
+ "learning_rate": 2.0884092682273164e-05,
200
+ "loss": 0.0304,
201
+ "num_tokens": 13025108.0,
202
+ "step": 120
203
+ },
204
+ {
205
+ "epoch": 62.61538461538461,
206
+ "grad_norm": 0.3025402107446348,
207
+ "learning_rate": 1.9217197564594746e-05,
208
+ "loss": 0.0301,
209
+ "num_tokens": 13593094.0,
210
+ "step": 125
211
+ },
212
+ {
213
+ "epoch": 65.0,
214
+ "grad_norm": 0.1614629419393802,
215
+ "learning_rate": 1.760136867824191e-05,
216
+ "loss": 0.0304,
217
+ "num_tokens": 14109101.0,
218
+ "step": 130
219
+ },
220
+ {
221
+ "epoch": 67.61538461538461,
222
+ "grad_norm": 0.27767423895357596,
223
+ "learning_rate": 1.6046568145616648e-05,
224
+ "loss": 0.0302,
225
+ "num_tokens": 14677544.0,
226
+ "step": 135
227
+ },
228
+ {
229
+ "epoch": 70.0,
230
+ "grad_norm": 0.22771680806020217,
231
+ "learning_rate": 1.4562381829026239e-05,
232
+ "loss": 0.0301,
233
+ "num_tokens": 15194001.0,
234
+ "step": 140
235
+ },
236
+ {
237
+ "epoch": 72.61538461538461,
238
+ "grad_norm": 0.15147573878630052,
239
+ "learning_rate": 1.3157960230654482e-05,
240
+ "loss": 0.0302,
241
+ "num_tokens": 15760272.0,
242
+ "step": 145
243
+ },
244
+ {
245
+ "epoch": 75.0,
246
+ "grad_norm": 0.30022318204194276,
247
+ "learning_rate": 1.1841962076672928e-05,
248
+ "loss": 0.0296,
249
+ "num_tokens": 16282932.0,
250
+ "step": 150
251
+ },
252
+ {
253
+ "epoch": 77.61538461538461,
254
+ "grad_norm": 0.23378529976618187,
255
+ "learning_rate": 1.0622500933314661e-05,
256
+ "loss": 0.03,
257
+ "num_tokens": 16850676.0,
258
+ "step": 155
259
+ },
260
+ {
261
+ "epoch": 80.0,
262
+ "grad_norm": 0.20953546136224485,
263
+ "learning_rate": 9.507095184040463e-06,
264
+ "loss": 0.03,
265
+ "num_tokens": 17368846.0,
266
+ "step": 160
267
+ },
268
+ {
269
+ "epoch": 82.61538461538461,
270
+ "grad_norm": 0.24443505025188147,
271
+ "learning_rate": 8.502621676204667e-06,
272
+ "loss": 0.0297,
273
+ "num_tokens": 17938548.0,
274
+ "step": 165
275
+ },
276
+ {
277
+ "epoch": 85.0,
278
+ "grad_norm": 0.19385179584534545,
279
+ "learning_rate": 7.6152733230043974e-06,
280
+ "loss": 0.0297,
281
+ "num_tokens": 18457902.0,
282
+ "step": 170
283
+ },
284
+ {
285
+ "epoch": 87.61538461538461,
286
+ "grad_norm": 0.2513810490028751,
287
+ "learning_rate": 6.8505209221104245e-06,
288
+ "loss": 0.0297,
289
+ "num_tokens": 19026076.0,
290
+ "step": 175
291
+ },
292
+ {
293
+ "epoch": 90.0,
294
+ "grad_norm": 0.17901281842285005,
295
+ "learning_rate": 6.213079426380231e-06,
296
+ "loss": 0.0301,
297
+ "num_tokens": 19540969.0,
298
+ "step": 180
299
+ },
300
+ {
301
+ "epoch": 92.61538461538461,
302
+ "grad_norm": 0.25845959895559373,
303
+ "learning_rate": 5.706878874605801e-06,
304
+ "loss": 0.0297,
305
+ "num_tokens": 20107971.0,
306
+ "step": 185
307
+ },
308
+ {
309
+ "epoch": 95.0,
310
+ "grad_norm": 0.19177298165702886,
311
+ "learning_rate": 5.335040161517588e-06,
312
+ "loss": 0.0297,
313
+ "num_tokens": 20627722.0,
314
+ "step": 190
315
+ },
316
+ {
317
+ "epoch": 97.61538461538461,
318
+ "grad_norm": 0.2837015917671968,
319
+ "learning_rate": 5.0998557964307e-06,
320
+ "loss": 0.0298,
321
+ "num_tokens": 21196424.0,
322
+ "step": 195
323
+ },
324
+ {
325
+ "epoch": 100.0,
326
+ "grad_norm": 0.1861921497369495,
327
+ "learning_rate": 5.002775769162637e-06,
328
+ "loss": 0.0298,
329
+ "num_tokens": 21714505.0,
330
+ "step": 200
331
+ },
332
+ {
333
+ "epoch": 100.0,
334
+ "step": 200,
335
+ "total_flos": 78851405905920.0,
336
+ "train_loss": 0.10361792713403702,
337
+ "train_runtime": 1333.4603,
338
+ "train_samples_per_second": 119.989,
339
+ "train_steps_per_second": 0.15
340
+ }
341
+ ],
342
+ "logging_steps": 5,
343
+ "max_steps": 200,
344
+ "num_input_tokens_seen": 0,
345
+ "num_train_epochs": 100,
346
+ "save_steps": 20,
347
+ "stateful_callbacks": {
348
+ "TrainerControl": {
349
+ "args": {
350
+ "should_epoch_stop": false,
351
+ "should_evaluate": false,
352
+ "should_log": false,
353
+ "should_save": true,
354
+ "should_training_stop": true
355
+ },
356
+ "attributes": {}
357
+ }
358
+ },
359
+ "total_flos": 78851405905920.0,
360
+ "train_batch_size": 16,
361
+ "trial_name": null,
362
+ "trial_params": null
363
+ }