-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrunning_commands
278 lines (256 loc) · 7.24 KB
/
running_commands
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
###########################################
Unified Commonsense (commonsense_15k.json)
###########################################
# LLaMA-7B-LoNAS
CUDA_VISIBLE_DEVICES=${DEVICES} python run_commonsense.py \
--dataset_path datasets/commonsense_15k.json \
--model_name_or_path yahma/llama-7b-hf \
--do_train \
--do_test \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 4 \
--num_train_epochs 6 \
--warmup_steps 100 \
--optim adamw_torch \
--fp16 \
--output_dir ./trained_super_adapter/unified_commonsense/lonas-llama-7b-commonsense \
--logging_steps 20 \
--save_strategy epoch \
--save_total_limit 2 \
--val_set_size 0 \
--lora \
--lora_r 32 \
--lora_alpha 64 \
--lora_dropout 0.1 \
--target_modules q_proj,k_proj,v_proj,up_proj,gate_proj,down_proj \
--nncf_config nncf_config/unified_commonsense/nncf_lonas_llama_7b.json
#############################
Unified Math (math_10k.json)
#############################
# BLOOMz-7B-LoNAS
CUDA_VISIBLE_DEVICES=${DEVICES} python run_math.py \
--dataset_path datasets/math_10k.json \
--model_name_or_path bigscience/bloomz-7b1 \
--do_train \
--do_test \
--per_device_train_batch_size 4 \
--gradient_accumulation_steps 4 \
--num_train_epochs 8 \
--warmup_steps 100 \
--optim adamw_torch \
--fp16 \
--output_dir ./trained_super_adapter/unified_math/lonas-bloomz-7b-math \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--val_set_size 0 \
--lora \
--lora_r 32 \
--lora_alpha 64 \
--lora_dropout 0.1 \
--target_modules query_key_value,dense_h_to_4h,dense_4h_to_h \
--nncf_config nncf_config/unified_math/nncf_lonas_bloomz_7b.json
#######################################
GLUE benchmark
#######################################
# task: rte
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name rte \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 64 \
--num_train_epochs 80 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-rte \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_rte.json
# task: mrpc
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name mrpc \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 64 \
--num_train_epochs 35 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-mrpc \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_mrpc.json
# task: stsb
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name stsb \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 60 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-stsb \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_stsb.json
# task: cola
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name cola \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 80 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-cola \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.05 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_cola.json
# task: sst2
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name sst2 \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 60 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-sst2 \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_sst2.json
# task: qnli
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name qnli \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 80 \
--max_seq_length 256 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-qnli \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_qnli.json
# task: qqp
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name qqp \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 60 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-qqp \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_qqp.json
# task: mnli
CUDA_VISIBLE_DEVICES=${DEVICES} python run_glue.py \
--task_name mnli \
--model_name_or_path bert-base-uncased \
--do_train \
--do_eval \
--do_search \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--num_train_epochs 40 \
--max_seq_length 128 \
--output_dir ./trained_super_adapter/glue/lonas-bert-base-mnli \
--logging_steps 20 \
--evaluation_strategy epoch \
--save_strategy epoch \
--save_total_limit 2 \
--lora \
--lora_r 8 \
--lora_alpha 16 \
--lora_dropout 0.1 \
--warmup_ratio 0.06 \
--seed 0 \
--weight_decay 0.1 \
--target_modules query,value \
--nncf_config nncf_config/glue/nncf_lonas_bert_base_mnli.json