-
Notifications
You must be signed in to change notification settings - Fork 0
/
e2e_training.sh
390 lines (377 loc) · 13.4 KB
/
e2e_training.sh
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
# export TORCH_DISTRIBUTED_DEBUG=DETAIL
# export DEEPSPEED_LOG_LEVEL=DEBUG
# export OMPI_MCA_btl_base_verbose=1
# export NCCL_DEBUG=INFO
# export NCCL_DEBUG_SUBSYS=ALL
# export TORCH_CPP_LOG_LEVEL=INFO
OUTPUT_DIR=./checkpoints_new/llava-uhd_2x2 #
# max_model_length=2048 # 2048 + 576 * 4 = 2048 + 2304 = 4352
# LR=0.001
# EPOCH=1
# PRBATCH=32
# gradient_accumulation_steps=1
deepspeed \
--master_port=12302 \
llava/train/llava_uhd/train_mem.py \
--deepspeed ./scripts/zero2.json \
--model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
--version plain \
--data_path ./playground/data/LLaVA-Pretrain/blip_laion_cc_sbu_558k.json \
--image_folder ./playground/data/LLaVA-Pretrain/images \
--vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
--mm_projector_type mlp2x_gelu \
--tune_mm_mlp_adapter True \
--mm_vision_select_layer -2 \
--mm_use_im_start_end False \
--mm_use_im_patch_token False \
--bf16 True \
--output_dir $OUTPUT_DIR \
--num_train_epochs 1 \
--per_device_train_batch_size 32 \
--per_device_eval_batch_size 4 \
--gradient_accumulation_steps 1 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 24000 \
--save_total_limit 1 \
--learning_rate 1e-3 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--tf32 True \
--model_max_length 2048 \
--gradient_checkpointing True \
--dataloader_num_workers 4 \
--lazy_preprocess True \
--report_to wandb \
--fix_size True \
--max_slice 5
# --include localhost:1,2,3,4,5,6,7 \
deepspeed \
--master_port=12302 \
llava/train/llava_uhd/train_mem.py \
--deepspeed ./scripts/zero3.json \
--model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
--version v1 \
--data_path ./playground/data/llava_v1_5_mix665k.json \
--image_folder ./playground/data \
--vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
--pretrain_mm_mlp_adapter $OUTPUT_DIR/mm_projector.bin \
--mm_projector_type mlp2x_gelu \
--mm_vision_select_layer -2 \
--mm_use_im_start_end False \
--mm_use_im_patch_token False \
--image_aspect_ratio pad \
--group_by_modality_length True \
--bf16 True \
--output_dir $OUTPUT_DIR \
--num_train_epochs 1 \
--per_device_train_batch_size 16 \
--per_device_eval_batch_size 4 \
--gradient_accumulation_steps 1 \
--evaluation_strategy "no" \
--save_strategy "steps" \
--save_steps 50000 \
--save_total_limit 1 \
--learning_rate 2e-5 \
--weight_decay 0. \
--warmup_ratio 0.03 \
--lr_scheduler_type "cosine" \
--logging_steps 1 \
--tf32 True \
--model_max_length 2048 \
--gradient_checkpointing True \
--dataloader_num_workers 4 \
--lazy_preprocess True \
--report_to wandb \
--fix_size True \
--max_slice 5
# # fix144query QWenSampler 0.0002 5ep plain adapt
# OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_5ep0002_uhd_adpat #
# mm_projector_type=tokenizerQW
# process_mode=anyres
# max_model_length=2048 # 2048 + 576 * 4 = 2048 + 2304 = 4352
# LR=0.0002
# EPOCH=5
# PRBATCH=32
# gradient_accumulation_steps=1
# deepspeed \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero2.json \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version plain \
# --data_path ./playground/data/LLaVA-Pretrain/blip_laion_cc_sbu_558k.json \
# --image_folder ./playground/data/LLaVA-Pretrain/images \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --mm_projector_type $mm_projector_type \
# --tune_mm_mlp_adapter True \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --image_aspect_ratio $process_mode \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $PRBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 24000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --report_to wandb \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross False \
# --adapt True
# # # fix144query QWenSampler 0.0002 5ep plain adapt sft
# # OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_5ep0002_multi_spatial_cross #
# LR=0.00002
# EPOCH=1
# FTBATCH=16
# max_model_length=2048 # 2048 + 4 * 256
# gradient_accumulation_steps=1
# deepspeed \
# --include localhost:1 \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero3.json \
# --lora_enable True --lora_r 128 --lora_alpha 256 --mm_projector_lr 2e-5 \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version v1 \
# --data_path ./playground/data/llava_v1_5_mix665k.json \
# --image_folder ./playground/data \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --pretrain_mm_mlp_adapter $OUTPUT_DIR/mm_projector.bin \
# --mm_projector_type $mm_projector_type \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --image_aspect_ratio $process_mode \
# --group_by_modality_length True \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $FTBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 10000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross False \
# --adapt True
# # # fix144query QWenSampler 0.001 1ep spatial cross
# OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_1ep001_spatial_cross #
# mm_projector_type=tokenizerQW
# max_model_length=2048 # 2048 + 576 * 4 = 2048 + 2304 = 4352
# LR=0.001
# EPOCH=1
# PRBATCH=32
# gradient_accumulation_steps=1
# deepspeed \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero2.json \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version plain \
# --data_path ./playground/data/LLaVA-Pretrain/blip_laion_cc_sbu_558k.json \
# --image_folder ./playground/data/LLaVA-Pretrain/images \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --mm_projector_type $mm_projector_type \
# --tune_mm_mlp_adapter True \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $PRBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 24000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --report_to wandb \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross True \
# --ratio "2"
# # # qw sampler fix 144 sft 0.001 1ep spatial cross
# # OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_5ep0002_multi_spatial_cross #
# LR=0.00002
# EPOCH=1
# FTBATCH=16
# max_model_length=2048 # 2048 + 4 * 256
# gradient_accumulation_steps=1
# mm_projector_type=tokenizerQW
# deepspeed \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero3.json \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version v1 \
# --data_path ./playground/data/llava_v1_5_mix665k.json \
# --image_folder ./playground/data \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --pretrain_mm_mlp_adapter $OUTPUT_DIR/mm_projector.bin \
# --mm_projector_type $mm_projector_type \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --image_aspect_ratio pad \
# --group_by_modality_length True \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $FTBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 10000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross True \
# --ratio "2"
# # # fix144query QWenSampler 0.0005 2ep spatial cross
# OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_2ep0005_spatial_cross #
# mm_projector_type=tokenizerQW
# max_model_length=2048 # 2048 + 576 * 4 = 2048 + 2304 = 4352
# LR=0.0005
# EPOCH=2
# PRBATCH=32
# gradient_accumulation_steps=1
# deepspeed \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero2.json \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version plain \
# --data_path ./playground/data/LLaVA-Pretrain/blip_laion_cc_sbu_558k.json \
# --image_folder ./playground/data/LLaVA-Pretrain/images \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --mm_projector_type $mm_projector_type \
# --tune_mm_mlp_adapter True \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $PRBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 24000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --report_to wandb \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross True \
# --ratio "2"
# # # qw sampler fix 144 sft 0.001 1ep spatial cross
# # OUTPUT_DIR=./checkpoints_new/llava-v1.5-13b-pretrain_fix144_QWsampler_5ep0002_multi_spatial_cross #
# LR=0.00002
# EPOCH=1
# FTBATCH=16
# max_model_length=2048 # 2048 + 4 * 256
# gradient_accumulation_steps=1
# mm_projector_type=tokenizerQW
# deepspeed \
# --master_port=12302 \
# llava/train/train_mem.py \
# --deepspeed ./scripts/zero3.json \
# --model_name_or_path /home/guozonghao/pretrained_models/vicuna-13b-v1.5 \
# --version v1 \
# --data_path ./playground/data/llava_v1_5_mix665k.json \
# --image_folder ./playground/data \
# --vision_tower /home/guozonghao/pretrained_models/clip-vit-large-patch14-336 \
# --pretrain_mm_mlp_adapter $OUTPUT_DIR/mm_projector.bin \
# --mm_projector_type $mm_projector_type \
# --mm_vision_select_layer -2 \
# --mm_use_im_start_end False \
# --mm_use_im_patch_token False \
# --image_aspect_ratio pad \
# --group_by_modality_length True \
# --bf16 True \
# --output_dir $OUTPUT_DIR \
# --num_train_epochs $EPOCH \
# --per_device_train_batch_size $FTBATCH \
# --per_device_eval_batch_size 4 \
# --gradient_accumulation_steps $gradient_accumulation_steps \
# --evaluation_strategy "no" \
# --save_strategy "steps" \
# --save_steps 10000 \
# --save_total_limit 1 \
# --learning_rate $LR \
# --weight_decay 0. \
# --warmup_ratio 0.03 \
# --lr_scheduler_type "cosine" \
# --logging_steps 1 \
# --tf32 True \
# --model_max_length $max_model_length \
# --gradient_checkpointing True \
# --dataloader_num_workers 4 \
# --lazy_preprocess True \
# --crop_image_size 336 \
# --num_query 144 \
# --spatial_cross True \
# --ratio "2"