File size: 31,481 Bytes
bfe7b12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
DEVICE = "cuda:0"
DEBUG = False

config = {
    "model": {
        "codellama": {
            "base_model_id": "codellama/CodeLlama-7b-hf",
            "quantitize": "int8",
            "dataset": "Arithmetic_Simple",
            "data_collator": "DataCollatorForSeq2Seq",
            "peft_config": {
                "lora_config": {
                    "r": 16,
                    "lora_alpha": 16,
                    "target_modules": [
                        "q_proj",
                        "k_proj",
                        "v_proj",
                        "o_proj",
                        "gate_proj",
                        "up_proj",
                        "down_proj",
                    ],
                    "lora_dropout": 0.05,
                    "bias": "none",
                    "task_type": "CAUSAL_LM",
                },
            },
            "training_args": {
                "output_dir": "codellama-output",
                "warmup_steps": 100,
                "per_device_train_batch_size": 1,
                "per_device_eval_batch_size": 1,
                "gradient_accumulation_steps": 4,
                "max_steps": 10000,
                "learning_rate": 3e-4,
                "optim": "adamw_torch",
                "logging_dir": "codellama-output-logs",
                "logging_steps": 10,
                "save_strategy": "steps",
                "save_steps": 500,
                "load_best_model_at_end": False,
                "group_by_length": True,
                "fp16": True,
                "evaluation_strategy": "steps",
                "eval_steps": 1000,
                # Uncomment this line to set a custom integration to report the results and logs to
                # With transformers v4, the default value is "all"
                # With transformers v5, the default value will be "none"
                # "report_to": "wandb",
                # Uncomment this line to set a custom run name (default ones like "eternal-brook-20"
                # will be used if not set)
                # "run_name": "phi2-code-finetune",
                # Uncomment the following lines to trigger (Hugging Face built-in) evaluation after
                # every X steps of training
                # "evaluation_strategy": "steps",
                # "eval_steps": 200,
                # "do_eval": True,
            },
            "tokenizer": {
               "tokenize_config": {
                    "truncation": True,
                    "max_length": 192,
                    "padding": "max_length",
                },
                "prompt_template": "config/qa_template.txt",
            },
        },
        "phi-2": {
            "base_model_id": "microsoft/phi-2",
            "quantitize": "fp16",
            "dataset": "Arithmetic_Simple",
            "data_collator": "DataCollatorForLanguageModeling",
            "peft_config":{
                "lora_config": {
                    "r": 32,
                    "lora_alpha": 64,
                    "target_modules": [
                        "q_proj",
                        "k_proj",
                        "v_proj",
                        "dense",
                        "fc1",
                        "fc2",
                    ],
                    "bias": "none",
                    "lora_dropout": 0.05,
                    "task_type": "CAUSAL_LM",
                },
            },
            "training_args": {
                "output_dir": "phi2-output",
                "warmup_steps": 500,
                # fp16: ~21.5GiB VRAM; ~40h to finish
                "per_device_train_batch_size": 1,
                "per_device_eval_batch_size": 1,
                "gradient_accumulation_steps": 4,
                "max_steps": 100000,
                "learning_rate": 5e-5,
                "optim": "adamw_torch",
                "logging_dir": "phi2-output-logs",
                "logging_steps": 100,
                "save_strategy": "steps",
                "save_steps": 500,
                "evaluation_strategy": "steps",
                "eval_steps": 500,
                "fp16": True,
            },
            "tokenizer": {
                "tokenize_config": {
                    "truncation": True,
                    "max_length": 512,
                    "padding": "max_length",
                },
                "prompt_template": "config/qa_template.txt",
            },
        },
        "deepseek": {
            "base_model_id": "deepseek-ai/deepseek-coder-1.3b-instruct",
            # Quantization config guidelines for DeepSeek
            # If running on T4, RTX 20xx, or anything older like V100: quantitize="fp16"
            # If running on L4, A100, RTX 30xx/40xx, or anything Ampere or later: quantitize="bf16"
            "quantitize": "fp16",
            "dataset": "Arithmetic_Hard_Third",
            "data_collator": "DataCollatorForLanguageModeling",
            "peft_config":{
                "lora": {  # trainable params = 30.0 M
                    "r": 32,
                    "lora_alpha": 64,
                    "target_modules": [
                        "q_proj",
                        "k_proj",
                        "v_proj",
                        "o_proj",
                        "gate_proj",
                        "up_proj",
                        "down_proj",
                    ],
                    "bias": "none",
                    "lora_dropout": 0.05,
                    "task_type": "CAUSAL_LM",
                },
                "lora_large": {  # trainable params = not checked yet
                    "r": 128,
                    "lora_alpha": 256,
                    "target_modules": [
                        "q_proj",
                        "k_proj",
                        "v_proj",
                        "o_proj",
                        "gate_proj",
                        "up_proj",
                        "down_proj",
                    ],
                    "bias": "none",
                    "lora_dropout": 0.05,
                    "task_type": "CAUSAL_LM",
                },
            },
            "p_tuning_config": {  # Doesn't work, PEFT interface issues
                "num_virtual_tokens": 16,
                "num_transformer_submodules": 1,
                "token_dim": 2048,  # NOTE(Shih-Lun): should change w/ base LLM
                "encoder_hidden_size": 2048,
                "task_type": "CAUSAL_LM",
            },
            "training_args": {
                "warmup_steps": 500,
                # bf16: ~21.0GiB VRAM; ~21h to finish
                "per_device_train_batch_size": 4,
                "per_device_eval_batch_size": 4,
                "gradient_accumulation_steps": 1,
                "max_steps": 35000,
                "learning_rate": 2e-5,
                "optim": "adamw_torch",
                "logging_steps": 100//10,
                "save_strategy": "steps",
                "save_total_limit": 10,
                "save_steps": 500,
                "evaluation_strategy": "steps",
                "eval_steps": 500,
                "weight_decay": 0.01,
                "report_to": "wandb",
                "dataloader_num_workers": 4,
                "load_best_model_at_end": True,
                # fp16/bf16 config guidelines for DeepSeek
                # If running full tuning: Don't set fp16/bf16
                # If running LoRA: Match the quantization setting (either fp16=True or bf16=True)
                "fp16": True,
            },
            "tokenizer": {
                "tokenize_config": {
                    "truncation": True,
                    "max_length": 512,
                    "padding": "max_length",
                },
                "prompt_template": "config/qa_template.txt",
            },
        },
    },
    "dataset": {
        "simple_dataset": {
            "type": "huggingface",  # Public datasets on the Hugging Face Hub (only for testing)
            "dataset_purpose": "downstream",
            "name": "b-mc2/sql-create-context",
            "train_split": 0.9,
            "max_train_size": 100,
            "filling_field": ["question", "context", "answer"],
        },
        "testdset": {
            "type": "local",  # Local files
            "dataset_purpose": "downstream",
            "train_file": "data/Test/TestDataset.json",
            "val_file": "data/Test/TestDataset.json",
            "test_file": "data/Test/TestDataset.json",
            "filling_field": ["prompted_question", "answer"],
        },
        "deepmind_mathematics": {
            "type": "local",
            "dataset_purpose": "downstream",
            "filling_field": ["question", "answer"],
            "epoch_length":{
                "train": 54*4*50, # Module * BatchSize * lesson_num in each module
                "val": 54*4*1,
            },
        },
        "mixture_codegen": {
            "filling_field": ["Question", "Answer"],
            "dataset_purpose": "downstream",
        },
        "Arithmetic_Hard_prompt_C12_with_gh": {
            "filling_field": ["Question", "Answer"],
            "dataset_purpose": "downstream",
        },
        "MathQA_Python_loader": {
            "type": "list-like",  # List-like objects (we're going to use this for ablations)
            "dataset_purpose": "downstream",
            "train": "data/MathQA_Python_processed/mathqa_python_train_clean_final.json",
            "val": "data/MathQA_Python_processed/mathqa_python_dev_clean_final.json",
            "test": "data/MathQA_Python_processed/mathqa_python_test_clean_final.json",
            "filling_field": ["Question", "Answer"],
        },
        "APPS_loader": {
            "type": "list-like",  # List-like objects (we're going to use this for ablations)
            "dataset_purpose": "downstream",
            "train": "data/APPS/apps_train.json",
            "val": "data/APPS/apps_dev.json",
            "test": "data/APPS/test/apps_test_75.json",
            "filling_field": ["Question", "Answer"],
        },
        "MBPP_loader": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "train": "data/MBPP/mbpp_train.json",
            "val": "data/MBPP/mbpp_dev.json",
            "test": "data/MBPP/mbpp_test.json",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Simple": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds0_100",
                    # "Max_Ops3_Bounds0_1000",
                    # "Max_Ops4_Bounds0_100",
                    # "Max_Ops4_Bounds0_1000",
                    # "Max_Ops5_Bounds0_100",
                    # "Max_Ops5_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Simple",
            "val": "data/Arithmetic/Curriculum_Simple",
            "test": "data/Arithmetic/Curriculum_Simple",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Simple_First_Half": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds0_100",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Simple",
            "val": "data/Arithmetic/Curriculum_Simple",
            "test": "data/Arithmetic/Curriculum_Simple",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Simple_Second_Half": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Simple",
            "val": "data/Arithmetic/Curriculum_Simple",
            "test": "data/Arithmetic/Curriculum_Simple",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds-1000_1000",
                    "Max_Ops1_Bounds-100_100",
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds-1000_1000",
                    "Max_Ops2_Bounds-100_100",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds-1000_1000",
                    "Max_Ops3_Bounds-100_100",
                    "Max_Ops3_Bounds0_100",
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds-1000_1000",
                    "Max_Ops4_Bounds-100_100",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                    "Max_Ops5_Bounds-1000_1000",
                    "Max_Ops5_Bounds-100_100",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                    "Max_Ops6_Bounds-1000_1000",
                    "Max_Ops6_Bounds-100_100",
                    "Max_Ops6_Bounds0_100",
                    "Max_Ops6_Bounds0_1000",
                    "Max_Ops7_Bounds-1000_1000",
                    "Max_Ops7_Bounds-100_100",
                    "Max_Ops7_Bounds0_100",
                    "Max_Ops7_Bounds0_1000",
                    "Max_Ops8_Bounds-1000_1000",
                    "Max_Ops8_Bounds-100_100",
                    "Max_Ops8_Bounds0_100",
                    "Max_Ops8_Bounds0_1000",
                    "Max_Ops9_Bounds-1000_1000",
                    "Max_Ops9_Bounds-100_100",
                    "Max_Ops9_Bounds0_100",
                    "Max_Ops9_Bounds0_1000",
                    "Max_Ops10_Bounds-1000_1000",
                    "Max_Ops10_Bounds-100_100",
                    "Max_Ops10_Bounds0_100",
                    "Max_Ops10_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_First": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds-1000_1000",
                    "Max_Ops1_Bounds-100_100",
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds-1000_1000",
                    "Max_Ops2_Bounds-100_100",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds-1000_1000",
                    "Max_Ops3_Bounds-100_100",
                    "Max_Ops3_Bounds0_100",
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds-1000_1000",
                    "Max_Ops4_Bounds-100_100",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_Second": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops5_Bounds-1000_1000",
                    "Max_Ops5_Bounds-100_100",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                    "Max_Ops6_Bounds-1000_1000",
                    "Max_Ops6_Bounds-100_100",
                    "Max_Ops6_Bounds0_100",
                    "Max_Ops6_Bounds0_1000",
                    "Max_Ops7_Bounds-1000_1000",
                    "Max_Ops7_Bounds-100_100",
                    "Max_Ops7_Bounds0_100",
                    "Max_Ops7_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_Third": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops8_Bounds-1000_1000",
                    "Max_Ops8_Bounds-100_100",
                    "Max_Ops8_Bounds0_100",
                    "Max_Ops8_Bounds0_1000",
                    "Max_Ops9_Bounds-1000_1000",
                    "Max_Ops9_Bounds-100_100",
                    "Max_Ops9_Bounds0_100",
                    "Max_Ops9_Bounds0_1000",
                    "Max_Ops10_Bounds-1000_1000",
                    "Max_Ops10_Bounds-100_100",
                    "Max_Ops10_Bounds0_100",
                    "Max_Ops10_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_prompt_C11": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds-1000_1000",
                    "Max_Ops1_Bounds-100_100",
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds-1000_1000",
                    "Max_Ops2_Bounds-100_100",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds-1000_1000",
                    "Max_Ops3_Bounds-100_100",
                    "Max_Ops3_Bounds0_100",
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds-1000_1000",
                    "Max_Ops4_Bounds-100_100",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                    "Max_Ops5_Bounds-1000_1000",
                    "Max_Ops5_Bounds-100_100",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                    "Max_Ops6_Bounds-1000_1000",
                    "Max_Ops6_Bounds-100_100",
                    "Max_Ops6_Bounds0_100",
                    "Max_Ops6_Bounds0_1000",
                    "Max_Ops7_Bounds-1000_1000",
                    "Max_Ops7_Bounds-100_100",
                    "Max_Ops7_Bounds0_100",
                    "Max_Ops7_Bounds0_1000",
                    "Max_Ops8_Bounds-1000_1000",
                    "Max_Ops8_Bounds-100_100",
                    "Max_Ops8_Bounds0_100",
                    "Max_Ops8_Bounds0_1000",
                    "Max_Ops9_Bounds-1000_1000",
                    "Max_Ops9_Bounds-100_100",
                    "Max_Ops9_Bounds0_100",
                    "Max_Ops9_Bounds0_1000",
                    "Max_Ops10_Bounds-1000_1000",
                    "Max_Ops10_Bounds-100_100",
                    "Max_Ops10_Bounds0_100",
                    "Max_Ops10_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_prompt_C12": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds-1000_1000",
                    "Max_Ops1_Bounds-100_100",
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds-1000_1000",
                    "Max_Ops2_Bounds-100_100",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds-1000_1000",
                    "Max_Ops3_Bounds-100_100",
                    "Max_Ops3_Bounds0_100",
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds-1000_1000",
                    "Max_Ops4_Bounds-100_100",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                    "Max_Ops5_Bounds-1000_1000",
                    "Max_Ops5_Bounds-100_100",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                    "Max_Ops6_Bounds-1000_1000",
                    "Max_Ops6_Bounds-100_100",
                    "Max_Ops6_Bounds0_100",
                    "Max_Ops6_Bounds0_1000",
                    "Max_Ops7_Bounds-1000_1000",
                    "Max_Ops7_Bounds-100_100",
                    "Max_Ops7_Bounds0_100",
                    "Max_Ops7_Bounds0_1000",
                    "Max_Ops8_Bounds-1000_1000",
                    "Max_Ops8_Bounds-100_100",
                    "Max_Ops8_Bounds0_100",
                    "Max_Ops8_Bounds0_1000",
                    "Max_Ops9_Bounds-1000_1000",
                    "Max_Ops9_Bounds-100_100",
                    "Max_Ops9_Bounds0_100",
                    "Max_Ops9_Bounds0_1000",
                    "Max_Ops10_Bounds-1000_1000",
                    "Max_Ops10_Bounds-100_100",
                    "Max_Ops10_Bounds0_100",
                    "Max_Ops10_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_Hard_prompt_C12_intermediate": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops1_Bounds-1000_1000",
                    "Max_Ops1_Bounds-100_100",
                    "Max_Ops1_Bounds0_100",
                    "Max_Ops1_Bounds0_1000",
                    "Max_Ops2_Bounds-1000_1000",
                    "Max_Ops2_Bounds-100_100",
                    "Max_Ops2_Bounds0_100",
                    "Max_Ops2_Bounds0_1000",
                    "Max_Ops3_Bounds-1000_1000",
                    "Max_Ops3_Bounds-100_100",
                    "Max_Ops3_Bounds0_100",
                    "Max_Ops3_Bounds0_1000",
                    "Max_Ops4_Bounds-1000_1000",
                    "Max_Ops4_Bounds-100_100",
                    "Max_Ops4_Bounds0_100",
                    "Max_Ops4_Bounds0_1000",
                    "Max_Ops5_Bounds-1000_1000",
                    "Max_Ops5_Bounds-100_100",
                    "Max_Ops5_Bounds0_100",
                    "Max_Ops5_Bounds0_1000",
                    "Max_Ops6_Bounds-1000_1000",
                    "Max_Ops6_Bounds-100_100",
                    "Max_Ops6_Bounds0_100",
                    "Max_Ops6_Bounds0_1000",
                    "Max_Ops7_Bounds-1000_1000",
                    "Max_Ops7_Bounds-100_100",
                    "Max_Ops7_Bounds0_100",
                    "Max_Ops7_Bounds0_1000",
                    "Max_Ops8_Bounds-1000_1000",
                    "Max_Ops8_Bounds-100_100",
                    "Max_Ops8_Bounds0_100",
                    "Max_Ops8_Bounds0_1000",
                    "Max_Ops9_Bounds-1000_1000",
                    "Max_Ops9_Bounds-100_100",
                    "Max_Ops9_Bounds0_100",
                    "Max_Ops9_Bounds0_1000",
                    "Max_Ops10_Bounds-1000_1000",
                    "Max_Ops10_Bounds-100_100",
                    "Max_Ops10_Bounds0_100",
                    "Max_Ops10_Bounds0_1000",
                ]
            },
            "train": "data/Arithmetic/Curriculum_Hard",
            "val": "data/Arithmetic/Curriculum_Hard",
            "test": "data/Arithmetic/Curriculum_Hard",
            "filling_field": ["Question", "Answer"],
        },
        "Arithmetic_XHard": {
            "type": "list-like",
            "dataset_purpose": "downstream",
            "attributes": {        
                "subjects": [1, 2, 3, 4, 5, 6, 7, 8, 9],
                "lessons": [
                    "Max_Ops10_Bounds0_10000.json",
                    "Max_Ops10_Bounds0_1000.json",
                    "Max_Ops10_Bounds-10000_10000.json",
                    "Max_Ops10_Bounds-1000_1000.json",
                    "Max_Ops11_Bounds0_10000.json",
                    "Max_Ops11_Bounds0_1000.json",
                    "Max_Ops11_Bounds-10000_10000.json",
                    "Max_Ops11_Bounds-1000_1000.json",
                    "Max_Ops12_Bounds0_10000.json",
                    "Max_Ops12_Bounds0_1000.json",
                    "Max_Ops12_Bounds-10000_10000.json",
                    "Max_Ops12_Bounds-1000_1000.json",
                    "Max_Ops13_Bounds0_10000.json",
                    "Max_Ops13_Bounds0_1000.json",
                    "Max_Ops13_Bounds-10000_10000.json",
                    "Max_Ops13_Bounds-1000_1000.json",
                    "Max_Ops14_Bounds0_10000.json",
                    "Max_Ops14_Bounds0_1000.json",
                    "Max_Ops14_Bounds-10000_10000.json",
                    "Max_Ops14_Bounds-1000_1000.json",
                    "Max_Ops15_Bounds0_10000.json",
                    "Max_Ops15_Bounds0_1000.json",
                    "Max_Ops15_Bounds-10000_10000.json",
                    "Max_Ops15_Bounds-1000_1000.json",
                    "Max_Ops16_Bounds0_10000.json",
                    "Max_Ops16_Bounds0_1000.json",
                    "Max_Ops16_Bounds-10000_10000.json",
                    "Max_Ops16_Bounds-1000_1000.json",
                    "Max_Ops17_Bounds0_10000.json",
                    "Max_Ops17_Bounds0_1000.json",
                    "Max_Ops17_Bounds-10000_10000.json",
                    "Max_Ops17_Bounds-1000_1000.json",
                    "Max_Ops18_Bounds0_10000.json",
                    "Max_Ops18_Bounds0_1000.json",
                    "Max_Ops18_Bounds-10000_10000.json",
                    "Max_Ops18_Bounds-1000_1000.json",
                    "Max_Ops19_Bounds0_10000.json",
                    "Max_Ops19_Bounds0_1000.json",
                    "Max_Ops19_Bounds-10000_10000.json",
                    "Max_Ops19_Bounds-1000_1000.json",
                    "Max_Ops1_Bounds0_10000.json",
                    "Max_Ops1_Bounds0_1000.json",
                    "Max_Ops1_Bounds-10000_10000.json",
                    "Max_Ops1_Bounds-1000_1000.json",
                    "Max_Ops20_Bounds0_10000.json",
                    "Max_Ops20_Bounds0_1000.json",
                    "Max_Ops20_Bounds-10000_10000.json",
                    "Max_Ops20_Bounds-1000_1000.json",
                    "Max_Ops2_Bounds0_10000.json",
                    "Max_Ops2_Bounds0_1000.json",
                    "Max_Ops2_Bounds-10000_10000.json",
                    "Max_Ops2_Bounds-1000_1000.json",
                    "Max_Ops3_Bounds0_10000.json",
                    "Max_Ops3_Bounds0_1000.json",
                    "Max_Ops3_Bounds-10000_10000.json",
                    "Max_Ops3_Bounds-1000_1000.json",
                    "Max_Ops4_Bounds0_10000.json",
                    "Max_Ops4_Bounds0_1000.json",
                    "Max_Ops4_Bounds-10000_10000.json",
                    "Max_Ops4_Bounds-1000_1000.json",
                    "Max_Ops5_Bounds0_10000.json",
                    "Max_Ops5_Bounds0_1000.json",
                    "Max_Ops5_Bounds-10000_10000.json",
                    "Max_Ops5_Bounds-1000_1000.json",
                    "Max_Ops6_Bounds0_10000.json",
                    "Max_Ops6_Bounds0_1000.json",
                    "Max_Ops6_Bounds-10000_10000.json",
                    "Max_Ops6_Bounds-1000_1000.json",
                    "Max_Ops7_Bounds0_10000.json",
                    "Max_Ops7_Bounds0_1000.json",
                    "Max_Ops7_Bounds-10000_10000.json",
                    "Max_Ops7_Bounds-1000_1000.json",
                    "Max_Ops8_Bounds0_10000.json",
                    "Max_Ops8_Bounds0_1000.json",
                    "Max_Ops8_Bounds-10000_10000.json",
                    "Max_Ops8_Bounds-1000_1000.json",
                    "Max_Ops9_Bounds0_10000.json",
                    "Max_Ops9_Bounds0_1000.json",
                    "Max_Ops9_Bounds-10000_10000.json",
                    "Max_Ops9_Bounds-1000_1000.json",
                ]
            },
            "train": "data/Arithmetic/Curriculum_XHard",
            "val": "data/Arithmetic/Curriculum_XHard",
            "test": "data/Arithmetic/Curriculum_XHard",
            "filling_field": ["Question", "Answer"],
        },
        "GSM8K": {
            "type": "local",
            "dataset_purpose": "downstream",
            "train_file": "data/GSM8K/GSM8K_train.json",
            "val_file": "data/GSM8K/GSM8K_test.json",
            "test_file": "data/GSM8K/GSM8K_dev.json",
            "filling_field": ["Body", "Question", "Answer"],
        },
        "APPS": {
            "type": "local",
            "dataset_purpose": "downstream",
            "train_file": "data/APPS/apps_train.json",
            "val_file": "data/APPS/apps_test.json",
            "test_file": "data/APPS/apps_dev.json",
            "filling_field": ["Body", "Question", "Answer"],
        },
        "ghcode_python": {
            "type": "huggingface",
            "dataset_purpose": "pretrain",
            "name": "slseanwu/ghcode_python_split_700k",
            "max_eval_size": 1000,
            "max_train_size": 160000,
            "filling_field": ["code"],
        },
    },
}


if DEBUG:
    config.epochs = 100
    config.save_steps = 10
    config.train_dataset = "local-test-train"
    config.val_dataset = "local-test-dev"
    config.test_dataset = "test-clean"