madokalif commited on
Commit
44e0bc4
·
verified ·
1 Parent(s): 66ba3ee

qwen3vl8b_full_v1: checkpoint-600

Browse files
judge4/qwen3vl8b_full_v1/checkpoint-600/config.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3VLForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 151655,
7
+ "model_type": "qwen3_vl",
8
+ "text_config": {
9
+ "attention_bias": false,
10
+ "attention_dropout": 0.0,
11
+ "bos_token_id": 151643,
12
+ "dtype": "bfloat16",
13
+ "eos_token_id": 151645,
14
+ "head_dim": 128,
15
+ "hidden_act": "silu",
16
+ "hidden_size": 4096,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 12288,
19
+ "max_position_embeddings": 262144,
20
+ "model_type": "qwen3_vl_text",
21
+ "num_attention_heads": 32,
22
+ "num_hidden_layers": 36,
23
+ "num_key_value_heads": 8,
24
+ "pad_token_id": null,
25
+ "rms_norm_eps": 1e-06,
26
+ "rope_parameters": {
27
+ "mrope_interleaved": true,
28
+ "mrope_section": [
29
+ 24,
30
+ 20,
31
+ 20
32
+ ],
33
+ "rope_theta": 5000000,
34
+ "rope_type": "default"
35
+ },
36
+ "use_cache": true,
37
+ "vocab_size": 151936
38
+ },
39
+ "tie_word_embeddings": false,
40
+ "transformers_version": "5.10.2",
41
+ "use_cache": false,
42
+ "video_token_id": 151656,
43
+ "vision_config": {
44
+ "deepstack_visual_indexes": [
45
+ 8,
46
+ 16,
47
+ 24
48
+ ],
49
+ "depth": 27,
50
+ "dtype": "bfloat16",
51
+ "hidden_act": "gelu_pytorch_tanh",
52
+ "hidden_size": 1152,
53
+ "in_channels": 3,
54
+ "initializer_range": 0.02,
55
+ "intermediate_size": 4304,
56
+ "model_type": "qwen3_vl_vision",
57
+ "num_heads": 16,
58
+ "num_position_embeddings": 2304,
59
+ "out_hidden_size": 4096,
60
+ "patch_size": 16,
61
+ "spatial_merge_size": 2,
62
+ "temporal_patch_size": 2
63
+ },
64
+ "vision_end_token_id": 151653,
65
+ "vision_start_token_id": 151652
66
+ }
judge4/qwen3vl8b_full_v1/checkpoint-600/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.0,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "5.10.2"
14
+ }
judge4/qwen3vl8b_full_v1/checkpoint-600/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:96d2581260d403ff2f2d74da94f2fcaee18f61f3127eee2747387e41b6c1b289
3
+ size 17534340584
judge4/qwen3vl8b_full_v1/checkpoint-600/trainer_state.json ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 200,
3
+ "best_metric": 0.986340126194396,
4
+ "best_model_checkpoint": "/cache/hyeongjinkim/runs/yesno/qwen3vl8b/checkpoint-200",
5
+ "epoch": 0.32089851584436424,
6
+ "eval_steps": 200,
7
+ "global_step": 600,
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.00534830859740607,
14
+ "grad_norm": 115.39302942622305,
15
+ "learning_rate": 1.5789473684210526e-06,
16
+ "loss": 0.6299215316772461,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.01069661719481214,
21
+ "grad_norm": 39.09323838946906,
22
+ "learning_rate": 3.3333333333333333e-06,
23
+ "loss": 0.5217976570129395,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.016044925792218213,
28
+ "grad_norm": 58.33327100367131,
29
+ "learning_rate": 5.087719298245615e-06,
30
+ "loss": 0.36051628589630125,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.02139323438962428,
35
+ "grad_norm": 31.360935036252677,
36
+ "learning_rate": 6.842105263157896e-06,
37
+ "loss": 0.3351165771484375,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 0.026741542987030353,
42
+ "grad_norm": 11.148106043175956,
43
+ "learning_rate": 8.596491228070176e-06,
44
+ "loss": 0.32320551872253417,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 0.032089851584436425,
49
+ "grad_norm": 93.48741175980791,
50
+ "learning_rate": 9.999969973569808e-06,
51
+ "loss": 0.2841494083404541,
52
+ "step": 60
53
+ },
54
+ {
55
+ "epoch": 0.03743816018184249,
56
+ "grad_norm": 24.041199474493364,
57
+ "learning_rate": 9.99891908637917e-06,
58
+ "loss": 0.31807770729064944,
59
+ "step": 70
60
+ },
61
+ {
62
+ "epoch": 0.04278646877924856,
63
+ "grad_norm": 17.28784245820742,
64
+ "learning_rate": 9.996367238293978e-06,
65
+ "loss": 0.25719327926635743,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 0.048134777376654635,
70
+ "grad_norm": 18.79954418521905,
71
+ "learning_rate": 9.992315195524705e-06,
72
+ "loss": 0.16733503341674805,
73
+ "step": 90
74
+ },
75
+ {
76
+ "epoch": 0.05348308597406071,
77
+ "grad_norm": 7.718337979076894,
78
+ "learning_rate": 9.98676417472592e-06,
79
+ "loss": 0.30640153884887694,
80
+ "step": 100
81
+ },
82
+ {
83
+ "epoch": 0.05883139457146677,
84
+ "grad_norm": 18.87648077862634,
85
+ "learning_rate": 9.979715842630971e-06,
86
+ "loss": 0.23051707744598388,
87
+ "step": 110
88
+ },
89
+ {
90
+ "epoch": 0.06417970316887285,
91
+ "grad_norm": 53.620896521195476,
92
+ "learning_rate": 9.971172315551539e-06,
93
+ "loss": 0.315609073638916,
94
+ "step": 120
95
+ },
96
+ {
97
+ "epoch": 0.06952801176627892,
98
+ "grad_norm": 6.175189141785783,
99
+ "learning_rate": 9.961136158742194e-06,
100
+ "loss": 0.2716816902160645,
101
+ "step": 130
102
+ },
103
+ {
104
+ "epoch": 0.07487632036368498,
105
+ "grad_norm": 3.6987055466078678,
106
+ "learning_rate": 9.94961038563017e-06,
107
+ "loss": 0.17460014820098876,
108
+ "step": 140
109
+ },
110
+ {
111
+ "epoch": 0.08022462896109106,
112
+ "grad_norm": 92.14918625907542,
113
+ "learning_rate": 9.936598456910553e-06,
114
+ "loss": 0.1968517541885376,
115
+ "step": 150
116
+ },
117
+ {
118
+ "epoch": 0.08557293755849713,
119
+ "grad_norm": 15.119460868723982,
120
+ "learning_rate": 9.922104279507188e-06,
121
+ "loss": 0.23519439697265626,
122
+ "step": 160
123
+ },
124
+ {
125
+ "epoch": 0.09092124615590319,
126
+ "grad_norm": 15.019433747757887,
127
+ "learning_rate": 9.90613220539959e-06,
128
+ "loss": 0.24371695518493652,
129
+ "step": 170
130
+ },
131
+ {
132
+ "epoch": 0.09626955475330927,
133
+ "grad_norm": 5.870677605808927,
134
+ "learning_rate": 9.888687030316244e-06,
135
+ "loss": 0.1655200958251953,
136
+ "step": 180
137
+ },
138
+ {
139
+ "epoch": 0.10161786335071533,
140
+ "grad_norm": 38.43177000299922,
141
+ "learning_rate": 9.869773992294645e-06,
142
+ "loss": 0.1303710460662842,
143
+ "step": 190
144
+ },
145
+ {
146
+ "epoch": 0.10696617194812141,
147
+ "grad_norm": 3.4771977179980036,
148
+ "learning_rate": 9.849398770108534e-06,
149
+ "loss": 0.1649288058280945,
150
+ "step": 200
151
+ },
152
+ {
153
+ "epoch": 0.10696617194812141,
154
+ "eval_auroc": 0.986340126194396,
155
+ "eval_loss": 0.1778445839881897,
156
+ "eval_runtime": 162.8402,
157
+ "eval_samples_per_second": 32.566,
158
+ "eval_steps_per_second": 2.039,
159
+ "step": 200
160
+ },
161
+ {
162
+ "epoch": 0.11231448054552748,
163
+ "grad_norm": 17.78250131729676,
164
+ "learning_rate": 9.82756748156282e-06,
165
+ "loss": 0.26313281059265137,
166
+ "step": 210
167
+ },
168
+ {
169
+ "epoch": 0.11766278914293354,
170
+ "grad_norm": 16.167615574624104,
171
+ "learning_rate": 9.804286681656661e-06,
172
+ "loss": 0.1850219964981079,
173
+ "step": 220
174
+ },
175
+ {
176
+ "epoch": 0.12301109774033962,
177
+ "grad_norm": 16.202819227774476,
178
+ "learning_rate": 9.779563360615269e-06,
179
+ "loss": 0.19695448875427246,
180
+ "step": 230
181
+ },
182
+ {
183
+ "epoch": 0.1283594063377457,
184
+ "grad_norm": 4.679400123941397,
185
+ "learning_rate": 9.753404941791063e-06,
186
+ "loss": 0.19695805311203002,
187
+ "step": 240
188
+ },
189
+ {
190
+ "epoch": 0.13370771493515177,
191
+ "grad_norm": 22.048169793689425,
192
+ "learning_rate": 9.725819279434736e-06,
193
+ "loss": 0.12451494932174682,
194
+ "step": 250
195
+ },
196
+ {
197
+ "epoch": 0.13905602353255783,
198
+ "grad_norm": 16.514362356407883,
199
+ "learning_rate": 9.696814656336974e-06,
200
+ "loss": 0.13828051090240479,
201
+ "step": 260
202
+ },
203
+ {
204
+ "epoch": 0.1444043321299639,
205
+ "grad_norm": 10.880812314019147,
206
+ "learning_rate": 9.666399781341487e-06,
207
+ "loss": 0.16824707984924317,
208
+ "step": 270
209
+ },
210
+ {
211
+ "epoch": 0.14975264072736996,
212
+ "grad_norm": 13.594908068539505,
213
+ "learning_rate": 9.63458378673011e-06,
214
+ "loss": 0.16994980573654175,
215
+ "step": 280
216
+ },
217
+ {
218
+ "epoch": 0.15510094932477603,
219
+ "grad_norm": 13.979685146852107,
220
+ "learning_rate": 9.60137622548078e-06,
221
+ "loss": 0.12250713109970093,
222
+ "step": 290
223
+ },
224
+ {
225
+ "epoch": 0.16044925792218212,
226
+ "grad_norm": 23.1890145595953,
227
+ "learning_rate": 9.566787068399182e-06,
228
+ "loss": 0.31440751552581786,
229
+ "step": 300
230
+ },
231
+ {
232
+ "epoch": 0.16579756651958819,
233
+ "grad_norm": 0.7897764763294275,
234
+ "learning_rate": 9.53082670112494e-06,
235
+ "loss": 0.15762845277786255,
236
+ "step": 310
237
+ },
238
+ {
239
+ "epoch": 0.17114587511699425,
240
+ "grad_norm": 2.8159576992499646,
241
+ "learning_rate": 9.493505921013264e-06,
242
+ "loss": 0.19779951572418214,
243
+ "step": 320
244
+ },
245
+ {
246
+ "epoch": 0.17649418371440032,
247
+ "grad_norm": 12.467613821043953,
248
+ "learning_rate": 9.454835933892961e-06,
249
+ "loss": 0.22400574684143065,
250
+ "step": 330
251
+ },
252
+ {
253
+ "epoch": 0.18184249231180638,
254
+ "grad_norm": 25.616160480376983,
255
+ "learning_rate": 9.414828350701808e-06,
256
+ "loss": 0.2321730375289917,
257
+ "step": 340
258
+ },
259
+ {
260
+ "epoch": 0.18719080090921247,
261
+ "grad_norm": 1.3969530235405139,
262
+ "learning_rate": 9.37349518400028e-06,
263
+ "loss": 0.1542872667312622,
264
+ "step": 350
265
+ },
266
+ {
267
+ "epoch": 0.19253910950661854,
268
+ "grad_norm": 15.068102705852885,
269
+ "learning_rate": 9.330848844364709e-06,
270
+ "loss": 0.17226810455322267,
271
+ "step": 360
272
+ },
273
+ {
274
+ "epoch": 0.1978874181040246,
275
+ "grad_norm": 5.7792217561834835,
276
+ "learning_rate": 9.2869021366609e-06,
277
+ "loss": 0.1545494318008423,
278
+ "step": 370
279
+ },
280
+ {
281
+ "epoch": 0.20323572670143067,
282
+ "grad_norm": 71.6843121958736,
283
+ "learning_rate": 9.241668256199392e-06,
284
+ "loss": 0.1899905562400818,
285
+ "step": 380
286
+ },
287
+ {
288
+ "epoch": 0.20858403529883673,
289
+ "grad_norm": 21.6463524086354,
290
+ "learning_rate": 9.195160784773471e-06,
291
+ "loss": 0.07489174604415894,
292
+ "step": 390
293
+ },
294
+ {
295
+ "epoch": 0.21393234389624283,
296
+ "grad_norm": 0.13359985882796035,
297
+ "learning_rate": 9.14739368658114e-06,
298
+ "loss": 0.09913319945335389,
299
+ "step": 400
300
+ },
301
+ {
302
+ "epoch": 0.21393234389624283,
303
+ "eval_auroc": 0.983682796757702,
304
+ "eval_loss": 0.2364487200975418,
305
+ "eval_runtime": 159.5655,
306
+ "eval_samples_per_second": 33.234,
307
+ "eval_steps_per_second": 2.081,
308
+ "step": 400
309
+ },
310
+ {
311
+ "epoch": 0.2192806524936489,
312
+ "grad_norm": 62.19974030049211,
313
+ "learning_rate": 9.098381304032267e-06,
314
+ "loss": 0.2020780086517334,
315
+ "step": 410
316
+ },
317
+ {
318
+ "epoch": 0.22462896109105496,
319
+ "grad_norm": 9.247102421418825,
320
+ "learning_rate": 9.048138353442173e-06,
321
+ "loss": 0.11548291444778443,
322
+ "step": 420
323
+ },
324
+ {
325
+ "epoch": 0.22997726968846102,
326
+ "grad_norm": 22.970689639607503,
327
+ "learning_rate": 8.996679920612964e-06,
328
+ "loss": 0.11144022941589356,
329
+ "step": 430
330
+ },
331
+ {
332
+ "epoch": 0.2353255782858671,
333
+ "grad_norm": 1.4437964908827596,
334
+ "learning_rate": 8.944021456303898e-06,
335
+ "loss": 0.10462523698806762,
336
+ "step": 440
337
+ },
338
+ {
339
+ "epoch": 0.24067388688327315,
340
+ "grad_norm": 1.4696765282633264,
341
+ "learning_rate": 8.890178771592198e-06,
342
+ "loss": 0.16833703517913817,
343
+ "step": 450
344
+ },
345
+ {
346
+ "epoch": 0.24602219548067925,
347
+ "grad_norm": 10.334755827866527,
348
+ "learning_rate": 8.835168033125657e-06,
349
+ "loss": 0.15125012397766113,
350
+ "step": 460
351
+ },
352
+ {
353
+ "epoch": 0.2513705040780853,
354
+ "grad_norm": 1.1380018464880775,
355
+ "learning_rate": 8.779005758268486e-06,
356
+ "loss": 0.10879876613616943,
357
+ "step": 470
358
+ },
359
+ {
360
+ "epoch": 0.2567188126754914,
361
+ "grad_norm": 27.554855927355863,
362
+ "learning_rate": 8.721708810141862e-06,
363
+ "loss": 0.10096737146377563,
364
+ "step": 480
365
+ },
366
+ {
367
+ "epoch": 0.26206712127289744,
368
+ "grad_norm": 10.67291054191312,
369
+ "learning_rate": 8.663294392560658e-06,
370
+ "loss": 0.13645027875900267,
371
+ "step": 490
372
+ },
373
+ {
374
+ "epoch": 0.26741542987030353,
375
+ "grad_norm": 11.160169426656719,
376
+ "learning_rate": 8.603780044867866e-06,
377
+ "loss": 0.13505263328552247,
378
+ "step": 500
379
+ },
380
+ {
381
+ "epoch": 0.27276373846770957,
382
+ "grad_norm": 1.7311663016149148,
383
+ "learning_rate": 8.543183636668302e-06,
384
+ "loss": 0.09905856847763062,
385
+ "step": 510
386
+ },
387
+ {
388
+ "epoch": 0.27811204706511566,
389
+ "grad_norm": 12.491616112911325,
390
+ "learning_rate": 8.481523362463111e-06,
391
+ "loss": 0.13770177364349365,
392
+ "step": 520
393
+ },
394
+ {
395
+ "epoch": 0.2834603556625217,
396
+ "grad_norm": 17.56462162498995,
397
+ "learning_rate": 8.418817736186751e-06,
398
+ "loss": 0.06779674887657165,
399
+ "step": 530
400
+ },
401
+ {
402
+ "epoch": 0.2888086642599278,
403
+ "grad_norm": 14.317316633123855,
404
+ "learning_rate": 8.355085585648054e-06,
405
+ "loss": 0.1754995107650757,
406
+ "step": 540
407
+ },
408
+ {
409
+ "epoch": 0.2941569728573339,
410
+ "grad_norm": 12.736983924949136,
411
+ "learning_rate": 8.290346046877033e-06,
412
+ "loss": 0.05573989748954773,
413
+ "step": 550
414
+ },
415
+ {
416
+ "epoch": 0.2995052814547399,
417
+ "grad_norm": 0.6150496518993013,
418
+ "learning_rate": 8.224618558379166e-06,
419
+ "loss": 0.05098409652709961,
420
+ "step": 560
421
+ },
422
+ {
423
+ "epoch": 0.304853590052146,
424
+ "grad_norm": 0.06977215369259143,
425
+ "learning_rate": 8.157922855298834e-06,
426
+ "loss": 0.06332494020462036,
427
+ "step": 570
428
+ },
429
+ {
430
+ "epoch": 0.31020189864955205,
431
+ "grad_norm": 5.211076096702457,
432
+ "learning_rate": 8.090278963493714e-06,
433
+ "loss": 0.1354996919631958,
434
+ "step": 580
435
+ },
436
+ {
437
+ "epoch": 0.31555020724695815,
438
+ "grad_norm": 81.93895874357261,
439
+ "learning_rate": 8.021707193521865e-06,
440
+ "loss": 0.05751166939735412,
441
+ "step": 590
442
+ },
443
+ {
444
+ "epoch": 0.32089851584436424,
445
+ "grad_norm": 1.8276016342124084,
446
+ "learning_rate": 7.952228134543357e-06,
447
+ "loss": 0.20583314895629884,
448
+ "step": 600
449
+ },
450
+ {
451
+ "epoch": 0.32089851584436424,
452
+ "eval_auroc": 0.9816760537862258,
453
+ "eval_loss": 0.2224961817264557,
454
+ "eval_runtime": 164.6281,
455
+ "eval_samples_per_second": 32.212,
456
+ "eval_steps_per_second": 2.017,
457
+ "step": 600
458
+ }
459
+ ],
460
+ "logging_steps": 10,
461
+ "max_steps": 1870,
462
+ "num_input_tokens_seen": 0,
463
+ "num_train_epochs": 1,
464
+ "save_steps": 200,
465
+ "stateful_callbacks": {
466
+ "EarlyStoppingCallback": {
467
+ "args": {
468
+ "early_stopping_patience": 5,
469
+ "early_stopping_threshold": 0.0
470
+ },
471
+ "attributes": {
472
+ "early_stopping_patience_counter": 2
473
+ }
474
+ },
475
+ "TrainerControl": {
476
+ "args": {
477
+ "should_epoch_stop": false,
478
+ "should_evaluate": false,
479
+ "should_log": false,
480
+ "should_save": true,
481
+ "should_training_stop": false
482
+ },
483
+ "attributes": {}
484
+ }
485
+ },
486
+ "total_flos": 28208346169344.0,
487
+ "train_batch_size": 4,
488
+ "trial_name": null,
489
+ "trial_params": null
490
+ }
judge4/qwen3vl8b_full_v1/checkpoint-600/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5a6f4bcee28aa57305c334450d07345e21a06095708b28432288e4392d63148
3
+ size 6673
judge4/qwen3vl8b_full_v1/checkpoint-600/zero_to_torch.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ # DeepSpeed Team
5
+
6
+ import argparse
7
+
8
+ if __package__:
9
+ from . import zero_to_fp32
10
+ else:
11
+ import zero_to_fp32
12
+
13
+
14
+ def main(args=None):
15
+ parser = argparse.ArgumentParser(
16
+ description="Convert a DeepSpeed ZeRO checkpoint to float32, float16, or bfloat16 PyTorch weights.")
17
+ parser.add_argument("checkpoint_dir",
18
+ type=str,
19
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
20
+ parser.add_argument("output_dir", type=str, help="directory for the converted PyTorch state_dict files")
21
+ parser.add_argument("--dtype",
22
+ type=str,
23
+ choices=sorted(zero_to_fp32.OUTPUT_DTYPE_NAMES),
24
+ required=True,
25
+ help="output tensor dtype")
26
+ parser.add_argument("--max_shard_size",
27
+ type=str,
28
+ default="5GB",
29
+ help="maximum size of each checkpoint shard, such as 5GB or 500MB")
30
+ parser.add_argument("--safe_serialization",
31
+ default=False,
32
+ action='store_true',
33
+ help="save with safetensors instead of PyTorch pickle serialization")
34
+ parser.add_argument("-t",
35
+ "--tag",
36
+ type=str,
37
+ default=None,
38
+ help="checkpoint tag used as a unique identifier, e.g., global_step1")
39
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
40
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug output")
41
+ parsed_args = parser.parse_args(args)
42
+
43
+ zero_to_fp32.debug = parsed_args.debug
44
+ zero_to_fp32.convert_zero_checkpoint_to_state_dict(parsed_args.checkpoint_dir,
45
+ parsed_args.output_dir,
46
+ dtype=parsed_args.dtype,
47
+ max_shard_size=parsed_args.max_shard_size,
48
+ safe_serialization=parsed_args.safe_serialization,
49
+ tag=parsed_args.tag,
50
+ exclude_frozen_parameters=parsed_args.exclude_frozen_parameters)
51
+
52
+
53
+ if __name__ == "__main__":
54
+ main()