-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_image2text.sh
27 lines (27 loc) · 983 Bytes
/
train_image2text.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
export CUDA_VISIBLE_DEVICES=1
python3 multimodal2text/BLIP/train.py \
--model_name_or_path Salesforce/blip-image-captioning-base \
--config_name Salesforce/blip-image-captioning-base \
--processor_name Salesforce/blip-image-captioning-base \
--train_file data/trec-pds.train.m2t.product2query.jsonl \
--max_src_length 256 \
--max_tgt_length 16 \
--output_dir models/blip-caption-base-product2query/ \
--overwrite_output_dir true \
--do_train --do_eval \
--save_strategy steps \
--max_steps 30000 \
--save_steps 2500 \
--eval_steps 500 \
--save_strategy steps \
--evaluation_strategy steps \
--per_device_train_batch_size 16 \
--per_device_eval_batch_size 16 \
--gradient_accumulation_steps 2 \
--learning_rate 1e-5 \
--lr_scheduler_type cosine \
--weight_decay 0.05 \
--remove_unused_columns false \
--report_to wandb \
--overwrite_output_dir true \
--run_name blip-caption-base-pds