-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
113 additions
and
66 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
LOAD='q-future/one-align' | ||
|
||
for i in $(seq 1 1) | ||
do | ||
echo "Split $i" | ||
DATA_FILE=playground/data/ft/maxwell/train_split_$i.json | ||
deepspeed --master_port 25801 q_align/train/train_mem.py \ | ||
--deepspeed ./scripts/zero3.json \ | ||
--lora_enable True --visual_abstractor_lr 2e-5\ | ||
--model_name_or_path $LOAD \ | ||
--version v1 \ | ||
--data_path $DATA_FILE \ | ||
--image_folder ../datasets/MaxWell \ | ||
--image_aspect_ratio pad \ | ||
--group_by_modality_length True \ | ||
--bf16 True \ | ||
--output_dir ./q-align-maxwell-lora-$i \ | ||
--num_train_epochs 5 \ | ||
--per_device_train_batch_size 4 \ | ||
--per_device_eval_batch_size 4 \ | ||
--gradient_accumulation_steps 8 \ | ||
--evaluation_strategy "no" \ | ||
--save_strategy "steps" \ | ||
--save_steps 800 \ | ||
--save_total_limit 3 \ | ||
--learning_rate 2e-4 \ | ||
--weight_decay 0. \ | ||
--warmup_ratio 0.03 \ | ||
--lr_scheduler_type "cosine" \ | ||
--logging_steps 1 \ | ||
--tf32 True \ | ||
--model_max_length 2048 \ | ||
--gradient_checkpointing True \ | ||
--tune_visual_abstractor True \ | ||
--freeze_vision_model False \ | ||
--dataloader_num_workers 4 \ | ||
--lazy_preprocess True \ | ||
--report_to wandb | ||
done |