File size: 14,875 Bytes
6bb0065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
export OMINI_CONFIG=./config/commonsense.yaml

#echo $OMINI_CONFIG
export TOKENIZERS_PARALLELISM=true

# CUDA Include (/cuda.h)
CUDA_INCLUDE_PATH="/home/work/miniconda3/envs/allm/include"

# 3. Add into CPATH & CPLUS_INCLUDE_PATH (C/C++ compiler)
export CPATH=$CPATH:$CUDA_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$CUDA_INCLUDE_PATH
# echo "CPATH is set to: $CPATH"
# echo "CPLUS_INCLUDE_PATH is set to: $CPLUS_INCLUDE_PATH"

export WANDB_PROJECT="Llama2_7B_FT_Math40k_2"

export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1

date +"%F %T"

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exp_init/run_ex01" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 --run_text "init|kaim_out_u=v"

# sleep 5 
# echo "1st exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exp_init/run_ex02" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 --run_text "init|kaim_out_u=v(ratio)"

# sleep 5 
# echo "2nd exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex03" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 2 --rotation_adapter_config.r 8

# sleep 5 
# echo "3rd exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex04" --trainer_args.learning_rate=2e-3 \
#      --rotation_adapter_config.num_rotations 4 --rotation_adapter_config.r 4
# sleep 5 
# echo "4th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex05" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 2 --rotation_adapter_config.r 8
# sleep 5 
# echo "5th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex06" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 4 --rotation_adapter_config.r 4
# sleep 5 
# echo "6th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_exps7" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16
# sleep 5 
# echo "7th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex08" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16
# sleep 5 
# echo "8th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex09" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 16 --rotation_adapter_config.r 1

# sleep 5 
# echo "9th exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex10" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 8 --rotation_adapter_config.r 2

# sleep 5 
# echo "10 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex11" --trainer_args.learning_rate=1e-2 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16

# sleep 5 
# echo "11 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex12" --trainer_args.learning_rate=1e-2 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16  --run_text 'u=v,def'

# sleep 5 
# echo "12 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex13" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 --run_text 'u=vkaim'

# sleep 5 
# echo "13 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex14" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 --run_text 'a,b,def'

# sleep 5 
# echo "14 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex15" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 4 --rotation_adapter_config.r 4

# sleep 5 
# echo "15 exp finishes"
# date +"%F %T"


# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex17" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 2.0 --trainer_args.eval_steps 500  --data.dataset_split train[:41023] --data.split_ratio 0.02493 \
#       --run_text "dropout|fix_token"
# sleep 5 
# echo "15 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex18" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0 --trainer_args.eval_steps 500  --data.dataset_split train[:41023] --data.split_ratio 0.02493 \
#       --run_text "dropout|fix_token"
# sleep 5 
# echo "158exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex19" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0 --trainer_args.eval_steps 500  --data.dataset_split train[:41023] --data.split_ratio 0.02493 \
#       --run_text "dropout|fix_token"
# sleep 5 
# echo "19 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex20" --trainer_args.learning_rate=8e-4 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0 --trainer_args.eval_steps 500  --data.dataset_split train[:41023] --data.split_ratio 0.02493 \
#       --run_text "dropout|fix_token"
# sleep 5 
# echo "20 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathR \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex21" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 2.0 --trainer_args.eval_steps 500  --data.dataset_split train[:41023] --data.split_ratio 0.02493 \
#       --run_text "dropout|2ep|1e3"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


# back to official 40k
# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex22" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 2.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|1e3|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex23" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|1e3|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex24" --trainer_args.learning_rate=1e-2 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|1e2|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex25" --trainer_args.learning_rate=2e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|2e3|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex26" --trainer_args.learning_rate=5e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|5e3|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex27" --trainer_args.learning_rate=8e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|8e3|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex28" --trainer_args.learning_rate=2e-2 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|2e2|40k"
# sleep 5 
# echo "21 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex29" --trainer_args.learning_rate=5e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 2.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
# sleep 5 
# echo "29 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex30" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 2.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
# sleep 5 
# echo "29 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex31" --trainer_args.learning_rate=5e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
# sleep 5 
# echo "29 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run

# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex32" --trainer_args.learning_rate=1e-3 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
# sleep 5 
# echo "29 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


# accelerate launch --main_process_port 41353 -m src.ft_mathQ \
#       --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex33" --trainer_args.learning_rate=1e-2 \
#       --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
#       --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
#       --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
# sleep 5 
# echo "29 exp finishes"
# date +"%F %T"
# wandb sync wandb/latest-run


accelerate launch --main_process_port 41353 -m src.ft_mathQ \
      --config_path $OMINI_CONFIG --trainer_args.output_dir "./exps/run_ex34" --trainer_args.learning_rate=2e-2 \
      --rotation_adapter_config.num_rotations 1 --rotation_adapter_config.r 16 \
      --trainer_args.num_train_epochs 3.0  --data.dataset_split train \
      --run_text "drop0.1|2ep|initu=v=0.01|40k" --trainer_args.per_device_train_batch_size 48
sleep 5 
echo "29 exp finishes"
date +"%F %T"
wandb sync wandb/latest-run

bash scripts/merge.sh