madokalif commited on
Commit
4e6579e
·
verified ·
1 Parent(s): 083f5ef

ablation_rb4b_first_front: checkpoint-600

Browse files
judge4/ablation_rb4b_first_front/checkpoint-600/config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": 2560,
17
+ "initializer_range": 0.02,
18
+ "intermediate_size": 9728,
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
+ "tie_word_embeddings": true,
37
+ "use_cache": true,
38
+ "vocab_size": 151936
39
+ },
40
+ "tie_word_embeddings": true,
41
+ "transformers_version": "5.10.2",
42
+ "use_cache": false,
43
+ "video_token_id": 151656,
44
+ "vision_config": {
45
+ "deepstack_visual_indexes": [
46
+ 5,
47
+ 11,
48
+ 17
49
+ ],
50
+ "depth": 24,
51
+ "dtype": "bfloat16",
52
+ "hidden_act": "gelu_pytorch_tanh",
53
+ "hidden_size": 1024,
54
+ "in_channels": 3,
55
+ "initializer_range": 0.02,
56
+ "intermediate_size": 4096,
57
+ "model_type": "qwen3_vl_vision",
58
+ "num_heads": 16,
59
+ "num_position_embeddings": 2304,
60
+ "out_hidden_size": 2560,
61
+ "patch_size": 16,
62
+ "spatial_merge_size": 2,
63
+ "temporal_patch_size": 2
64
+ },
65
+ "vision_end_token_id": 151653,
66
+ "vision_start_token_id": 151652
67
+ }
judge4/ablation_rb4b_first_front/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/ablation_rb4b_first_front/checkpoint-600/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff1ef3ef109292cd30cef12d1896c1fb73758e5494f2d2b065514123307717fa
3
+ size 8875719408
judge4/ablation_rb4b_first_front/checkpoint-600/trainer_state.json ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 600,
3
+ "best_metric": 0.9910447667136679,
4
+ "best_model_checkpoint": "/cache/hyeongjinkim/runs/ablation/rb4b/first_front/checkpoint-600",
5
+ "epoch": 0.32085561497326204,
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.0053475935828877,
14
+ "grad_norm": 63.496000947696785,
15
+ "learning_rate": 1.5789473684210526e-06,
16
+ "loss": 0.6174878120422364,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.0106951871657754,
21
+ "grad_norm": 31.06505275713485,
22
+ "learning_rate": 3.3333333333333333e-06,
23
+ "loss": 0.5425751686096192,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.016042780748663103,
28
+ "grad_norm": 72.36513851639928,
29
+ "learning_rate": 5.087719298245615e-06,
30
+ "loss": 0.32789561748504636,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.0213903743315508,
35
+ "grad_norm": 26.59270056693058,
36
+ "learning_rate": 6.842105263157896e-06,
37
+ "loss": 0.31007297039031984,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 0.026737967914438502,
42
+ "grad_norm": 14.837441500240509,
43
+ "learning_rate": 8.596491228070176e-06,
44
+ "loss": 0.35258073806762696,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 0.03208556149732621,
49
+ "grad_norm": 10.283684546629681,
50
+ "learning_rate": 9.999969973569808e-06,
51
+ "loss": 0.29442615509033204,
52
+ "step": 60
53
+ },
54
+ {
55
+ "epoch": 0.0374331550802139,
56
+ "grad_norm": 12.913928954371155,
57
+ "learning_rate": 9.99891908637917e-06,
58
+ "loss": 0.2397998571395874,
59
+ "step": 70
60
+ },
61
+ {
62
+ "epoch": 0.0427807486631016,
63
+ "grad_norm": 16.123618081840874,
64
+ "learning_rate": 9.996367238293978e-06,
65
+ "loss": 0.3360459327697754,
66
+ "step": 80
67
+ },
68
+ {
69
+ "epoch": 0.0481283422459893,
70
+ "grad_norm": 36.380592014295786,
71
+ "learning_rate": 9.992315195524705e-06,
72
+ "loss": 0.2545748710632324,
73
+ "step": 90
74
+ },
75
+ {
76
+ "epoch": 0.053475935828877004,
77
+ "grad_norm": 36.10454216259857,
78
+ "learning_rate": 9.98676417472592e-06,
79
+ "loss": 0.17188034057617188,
80
+ "step": 100
81
+ },
82
+ {
83
+ "epoch": 0.058823529411764705,
84
+ "grad_norm": 14.041900064246,
85
+ "learning_rate": 9.979715842630971e-06,
86
+ "loss": 0.29263758659362793,
87
+ "step": 110
88
+ },
89
+ {
90
+ "epoch": 0.06417112299465241,
91
+ "grad_norm": 8.824918482348956,
92
+ "learning_rate": 9.971172315551539e-06,
93
+ "loss": 0.22943391799926757,
94
+ "step": 120
95
+ },
96
+ {
97
+ "epoch": 0.06951871657754011,
98
+ "grad_norm": 3.3516211017390116,
99
+ "learning_rate": 9.961136158742194e-06,
100
+ "loss": 0.23463888168334962,
101
+ "step": 130
102
+ },
103
+ {
104
+ "epoch": 0.0748663101604278,
105
+ "grad_norm": 8.528700723677824,
106
+ "learning_rate": 9.94961038563017e-06,
107
+ "loss": 0.15888521671295167,
108
+ "step": 140
109
+ },
110
+ {
111
+ "epoch": 0.08021390374331551,
112
+ "grad_norm": 12.036172626466845,
113
+ "learning_rate": 9.936598456910553e-06,
114
+ "loss": 0.19314510822296144,
115
+ "step": 150
116
+ },
117
+ {
118
+ "epoch": 0.0855614973262032,
119
+ "grad_norm": 13.638149981527802,
120
+ "learning_rate": 9.922104279507188e-06,
121
+ "loss": 0.24253954887390136,
122
+ "step": 160
123
+ },
124
+ {
125
+ "epoch": 0.09090909090909091,
126
+ "grad_norm": 9.9531437233836,
127
+ "learning_rate": 9.90613220539959e-06,
128
+ "loss": 0.2577657699584961,
129
+ "step": 170
130
+ },
131
+ {
132
+ "epoch": 0.0962566844919786,
133
+ "grad_norm": 9.054241040023419,
134
+ "learning_rate": 9.888687030316244e-06,
135
+ "loss": 0.23272714614868165,
136
+ "step": 180
137
+ },
138
+ {
139
+ "epoch": 0.10160427807486631,
140
+ "grad_norm": 7.874024410196003,
141
+ "learning_rate": 9.869773992294645e-06,
142
+ "loss": 0.12369678020477295,
143
+ "step": 190
144
+ },
145
+ {
146
+ "epoch": 0.10695187165775401,
147
+ "grad_norm": 5.858557053778447,
148
+ "learning_rate": 9.849398770108534e-06,
149
+ "loss": 0.10168368816375732,
150
+ "step": 200
151
+ },
152
+ {
153
+ "epoch": 0.10695187165775401,
154
+ "eval_auroc": 0.967969861438238,
155
+ "eval_loss": 0.2974494695663452,
156
+ "eval_runtime": 53.1846,
157
+ "eval_samples_per_second": 99.709,
158
+ "eval_steps_per_second": 1.561,
159
+ "step": 200
160
+ },
161
+ {
162
+ "epoch": 0.11229946524064172,
163
+ "grad_norm": 31.228639610471234,
164
+ "learning_rate": 9.82756748156282e-06,
165
+ "loss": 0.2370980739593506,
166
+ "step": 210
167
+ },
168
+ {
169
+ "epoch": 0.11764705882352941,
170
+ "grad_norm": 7.769759318924798,
171
+ "learning_rate": 9.804286681656661e-06,
172
+ "loss": 0.17901017665863037,
173
+ "step": 220
174
+ },
175
+ {
176
+ "epoch": 0.12299465240641712,
177
+ "grad_norm": 6.871852451841734,
178
+ "learning_rate": 9.779563360615269e-06,
179
+ "loss": 0.1944662570953369,
180
+ "step": 230
181
+ },
182
+ {
183
+ "epoch": 0.12834224598930483,
184
+ "grad_norm": 5.814880974988343,
185
+ "learning_rate": 9.753404941791063e-06,
186
+ "loss": 0.11278246641159058,
187
+ "step": 240
188
+ },
189
+ {
190
+ "epoch": 0.13368983957219252,
191
+ "grad_norm": 44.237299981222094,
192
+ "learning_rate": 9.725819279434736e-06,
193
+ "loss": 0.17664599418640137,
194
+ "step": 250
195
+ },
196
+ {
197
+ "epoch": 0.13903743315508021,
198
+ "grad_norm": 3.999572319135077,
199
+ "learning_rate": 9.696814656336974e-06,
200
+ "loss": 0.21223096847534179,
201
+ "step": 260
202
+ },
203
+ {
204
+ "epoch": 0.1443850267379679,
205
+ "grad_norm": 19.481932995647735,
206
+ "learning_rate": 9.666399781341487e-06,
207
+ "loss": 0.15093398094177246,
208
+ "step": 270
209
+ },
210
+ {
211
+ "epoch": 0.1497326203208556,
212
+ "grad_norm": 21.755535486404113,
213
+ "learning_rate": 9.63458378673011e-06,
214
+ "loss": 0.20579123497009277,
215
+ "step": 280
216
+ },
217
+ {
218
+ "epoch": 0.15508021390374332,
219
+ "grad_norm": 15.644925132954429,
220
+ "learning_rate": 9.60137622548078e-06,
221
+ "loss": 0.1981935977935791,
222
+ "step": 290
223
+ },
224
+ {
225
+ "epoch": 0.16042780748663102,
226
+ "grad_norm": 7.842942397396877,
227
+ "learning_rate": 9.566787068399182e-06,
228
+ "loss": 0.08849411010742188,
229
+ "step": 300
230
+ },
231
+ {
232
+ "epoch": 0.1657754010695187,
233
+ "grad_norm": 11.13110628397666,
234
+ "learning_rate": 9.53082670112494e-06,
235
+ "loss": 0.24120802879333497,
236
+ "step": 310
237
+ },
238
+ {
239
+ "epoch": 0.1711229946524064,
240
+ "grad_norm": 5.848747187821105,
241
+ "learning_rate": 9.493505921013264e-06,
242
+ "loss": 0.17824615240097047,
243
+ "step": 320
244
+ },
245
+ {
246
+ "epoch": 0.17647058823529413,
247
+ "grad_norm": 30.22220252167621,
248
+ "learning_rate": 9.454835933892961e-06,
249
+ "loss": 0.1721101760864258,
250
+ "step": 330
251
+ },
252
+ {
253
+ "epoch": 0.18181818181818182,
254
+ "grad_norm": 15.56022786687354,
255
+ "learning_rate": 9.414828350701808e-06,
256
+ "loss": 0.15183382034301757,
257
+ "step": 340
258
+ },
259
+ {
260
+ "epoch": 0.18716577540106952,
261
+ "grad_norm": 5.888974688187698,
262
+ "learning_rate": 9.37349518400028e-06,
263
+ "loss": 0.16772096157073973,
264
+ "step": 350
265
+ },
266
+ {
267
+ "epoch": 0.1925133689839572,
268
+ "grad_norm": 17.094614276988775,
269
+ "learning_rate": 9.330848844364709e-06,
270
+ "loss": 0.09959290027618409,
271
+ "step": 360
272
+ },
273
+ {
274
+ "epoch": 0.19786096256684493,
275
+ "grad_norm": 12.243232845422808,
276
+ "learning_rate": 9.2869021366609e-06,
277
+ "loss": 0.16393094062805175,
278
+ "step": 370
279
+ },
280
+ {
281
+ "epoch": 0.20320855614973263,
282
+ "grad_norm": 7.882403695045858,
283
+ "learning_rate": 9.241668256199392e-06,
284
+ "loss": 0.105641770362854,
285
+ "step": 380
286
+ },
287
+ {
288
+ "epoch": 0.20855614973262032,
289
+ "grad_norm": 18.215518621079127,
290
+ "learning_rate": 9.195160784773471e-06,
291
+ "loss": 0.08500946760177612,
292
+ "step": 390
293
+ },
294
+ {
295
+ "epoch": 0.21390374331550802,
296
+ "grad_norm": 0.11236603962121432,
297
+ "learning_rate": 9.14739368658114e-06,
298
+ "loss": 0.09916813373565674,
299
+ "step": 400
300
+ },
301
+ {
302
+ "epoch": 0.21390374331550802,
303
+ "eval_auroc": 0.9878806115938148,
304
+ "eval_loss": 0.18153202533721924,
305
+ "eval_runtime": 44.7862,
306
+ "eval_samples_per_second": 118.407,
307
+ "eval_steps_per_second": 1.853,
308
+ "step": 400
309
+ },
310
+ {
311
+ "epoch": 0.2192513368983957,
312
+ "grad_norm": 32.95431800365397,
313
+ "learning_rate": 9.098381304032267e-06,
314
+ "loss": 0.14496264457702637,
315
+ "step": 410
316
+ },
317
+ {
318
+ "epoch": 0.22459893048128343,
319
+ "grad_norm": 21.645803560530073,
320
+ "learning_rate": 9.048138353442173e-06,
321
+ "loss": 0.1215695858001709,
322
+ "step": 420
323
+ },
324
+ {
325
+ "epoch": 0.22994652406417113,
326
+ "grad_norm": 9.755241166675246,
327
+ "learning_rate": 8.996679920612964e-06,
328
+ "loss": 0.12087414264678956,
329
+ "step": 430
330
+ },
331
+ {
332
+ "epoch": 0.23529411764705882,
333
+ "grad_norm": 0.21594833094974836,
334
+ "learning_rate": 8.944021456303898e-06,
335
+ "loss": 0.0730059266090393,
336
+ "step": 440
337
+ },
338
+ {
339
+ "epoch": 0.24064171122994651,
340
+ "grad_norm": 15.564702197108552,
341
+ "learning_rate": 8.890178771592198e-06,
342
+ "loss": 0.1264399766921997,
343
+ "step": 450
344
+ },
345
+ {
346
+ "epoch": 0.24598930481283424,
347
+ "grad_norm": 15.703878279721174,
348
+ "learning_rate": 8.835168033125657e-06,
349
+ "loss": 0.1410701632499695,
350
+ "step": 460
351
+ },
352
+ {
353
+ "epoch": 0.25133689839572193,
354
+ "grad_norm": 6.200775003310346,
355
+ "learning_rate": 8.779005758268486e-06,
356
+ "loss": 0.09645488858222961,
357
+ "step": 470
358
+ },
359
+ {
360
+ "epoch": 0.25668449197860965,
361
+ "grad_norm": 16.549569780517096,
362
+ "learning_rate": 8.721708810141862e-06,
363
+ "loss": 0.08079237937927246,
364
+ "step": 480
365
+ },
366
+ {
367
+ "epoch": 0.2620320855614973,
368
+ "grad_norm": 0.07829988407455624,
369
+ "learning_rate": 8.663294392560658e-06,
370
+ "loss": 0.08959035277366638,
371
+ "step": 490
372
+ },
373
+ {
374
+ "epoch": 0.26737967914438504,
375
+ "grad_norm": 6.24140690118872,
376
+ "learning_rate": 8.603780044867866e-06,
377
+ "loss": 0.09611517190933228,
378
+ "step": 500
379
+ },
380
+ {
381
+ "epoch": 0.2727272727272727,
382
+ "grad_norm": 22.89079502078522,
383
+ "learning_rate": 8.543183636668302e-06,
384
+ "loss": 0.045663094520568846,
385
+ "step": 510
386
+ },
387
+ {
388
+ "epoch": 0.27807486631016043,
389
+ "grad_norm": 7.533227979725642,
390
+ "learning_rate": 8.481523362463111e-06,
391
+ "loss": 0.11797351837158203,
392
+ "step": 520
393
+ },
394
+ {
395
+ "epoch": 0.28342245989304815,
396
+ "grad_norm": 23.54105948889332,
397
+ "learning_rate": 8.418817736186751e-06,
398
+ "loss": 0.11447679996490479,
399
+ "step": 530
400
+ },
401
+ {
402
+ "epoch": 0.2887700534759358,
403
+ "grad_norm": 0.6619422080829209,
404
+ "learning_rate": 8.355085585648054e-06,
405
+ "loss": 0.13855260610580444,
406
+ "step": 540
407
+ },
408
+ {
409
+ "epoch": 0.29411764705882354,
410
+ "grad_norm": 20.579669512679846,
411
+ "learning_rate": 8.290346046877033e-06,
412
+ "loss": 0.08626259565353393,
413
+ "step": 550
414
+ },
415
+ {
416
+ "epoch": 0.2994652406417112,
417
+ "grad_norm": 4.073205754054941,
418
+ "learning_rate": 8.224618558379166e-06,
419
+ "loss": 0.05674427151679993,
420
+ "step": 560
421
+ },
422
+ {
423
+ "epoch": 0.3048128342245989,
424
+ "grad_norm": 0.0875557428026015,
425
+ "learning_rate": 8.157922855298834e-06,
426
+ "loss": 0.10002219676971436,
427
+ "step": 570
428
+ },
429
+ {
430
+ "epoch": 0.31016042780748665,
431
+ "grad_norm": 1.3495205738227936,
432
+ "learning_rate": 8.090278963493714e-06,
433
+ "loss": 0.09237359762191773,
434
+ "step": 580
435
+ },
436
+ {
437
+ "epoch": 0.3155080213903743,
438
+ "grad_norm": 0.12429425654726145,
439
+ "learning_rate": 8.021707193521865e-06,
440
+ "loss": 0.0445035457611084,
441
+ "step": 590
442
+ },
443
+ {
444
+ "epoch": 0.32085561497326204,
445
+ "grad_norm": 0.03235497716591018,
446
+ "learning_rate": 7.952228134543357e-06,
447
+ "loss": 0.09809244871139526,
448
+ "step": 600
449
+ },
450
+ {
451
+ "epoch": 0.32085561497326204,
452
+ "eval_auroc": 0.9910447667136679,
453
+ "eval_loss": 0.17119848728179932,
454
+ "eval_runtime": 45.0658,
455
+ "eval_samples_per_second": 117.672,
456
+ "eval_steps_per_second": 1.842,
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": 0
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": 16296915124224.0,
487
+ "train_batch_size": 16,
488
+ "trial_name": null,
489
+ "trial_params": null
490
+ }
judge4/ablation_rb4b_first_front/checkpoint-600/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b5b2a1ed20e3bfce8657d0d41b44efad5c34f5c8b306758fb2e8b7c2c93ff61
3
+ size 6673
judge4/ablation_rb4b_first_front/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()