Upload config.py with huggingface_hub
Browse files
config.py
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
DS_CONFIG_ZERO0 = {
|
2 |
+
"bf16": {
|
3 |
+
"enabled": True,
|
4 |
+
},
|
5 |
+
"optimizer": {
|
6 |
+
"type": "AdamW",
|
7 |
+
"params": {
|
8 |
+
"lr": 3e-5,
|
9 |
+
"betas": [0.98, 0.999],
|
10 |
+
"eps": 1e-9
|
11 |
+
}
|
12 |
+
},
|
13 |
+
"scheduler": {
|
14 |
+
"type": "WarmupLR",
|
15 |
+
"params": {
|
16 |
+
"warmup_min_lr": 2e-5,
|
17 |
+
"warmup_max_lr": 5e-5,
|
18 |
+
"warmup_num_steps": 300
|
19 |
+
}
|
20 |
+
},
|
21 |
+
"zero_optimization": {
|
22 |
+
"stage": 0
|
23 |
+
},
|
24 |
+
"gradient_accumulation_steps": 16,
|
25 |
+
"train_micro_batch_size_per_gpu": 1,
|
26 |
+
"wall_clock_breakdown": False,
|
27 |
+
"steps_per_print": 50
|
28 |
+
}
|
29 |
+
|
30 |
+
DS_CONFIG_ft = {
|
31 |
+
"bf16": {
|
32 |
+
"enabled": True,
|
33 |
+
},
|
34 |
+
"optimizer": {
|
35 |
+
"type": "AdamW",
|
36 |
+
"params": {
|
37 |
+
"lr": 3e-5,
|
38 |
+
"betas": [0.98, 0.999],
|
39 |
+
"eps": 1e-9
|
40 |
+
}
|
41 |
+
},
|
42 |
+
"scheduler": {
|
43 |
+
"type": "WarmupLR",
|
44 |
+
"params": {
|
45 |
+
"warmup_min_lr": 2e-5,
|
46 |
+
"warmup_max_lr": 5e-5,
|
47 |
+
"warmup_num_steps": 300
|
48 |
+
}
|
49 |
+
},
|
50 |
+
"zero_optimization": {
|
51 |
+
"stage": 1,
|
52 |
+
"allgather_partitions": True,
|
53 |
+
"allgather_bucket_size": 2e8,
|
54 |
+
"overlap_comm": True,
|
55 |
+
"reduce_scatter": True,
|
56 |
+
"reduce_bucket_size": 2e8,
|
57 |
+
"contiguous_gradients": True,
|
58 |
+
"stage3_gather_16bit_weights_on_model_save": True,
|
59 |
+
"offload_optimizer": {
|
60 |
+
"device": "cpu"
|
61 |
+
}
|
62 |
+
},
|
63 |
+
"gradient_accumulation_steps": 16,
|
64 |
+
"train_micro_batch_size_per_gpu": 1,
|
65 |
+
"wall_clock_breakdown": False,
|
66 |
+
"steps_per_print": 50
|
67 |
+
}
|
68 |
+
|
69 |
+
TARGET_MODULES = [
|
70 |
+
"q_proj",
|
71 |
+
"v_proj",
|
72 |
+
]
|