open_flamingo icon indicating copy to clipboard operation
open_flamingo copied to clipboard

support training on only LAION 2B

Open anas-awadalla opened this issue 1 year ago • 5 comments

          @anas-awadalla Thanks for your quick reply.

Take your running command as an example, how can I change the following command to only train on LAION-2B based on a pre-trained OPT-1.3B?

torchrun --nnodes=1 --nproc_per_node=4 train.py \
--run_name flamingo3B \
--lm_path facebook/opt-1.3b \
--tokenizer_path facebook/opt-1.3b \
--dataset_resampled \
--laion_shards "/path/to/shards/shard-{0000..0999}.tar" \
--mmc4_shards "/path/to/shards/shard-{0000..0999}.tar" \
--batch_size_mmc4 4 \
--batch_size_laion 8 \
--train_num_samples_mmc4 125000 \
--train_num_samples_laion 250000 \
--loss_multiplier_laion 0.2 \
--workers=6 \
--num_epochs 250 \
--lr_scheduler constant \
--warmup_steps 5000 \
--use_media_placement_augmentation \
--mmc4_textsim_threshold 30

By the way, I would like to ask about the contribution of MMC4 for training. Have you conducted an ablation study on MMC4 + LAION-2B and LAION-2B only? Thank you very much for your time and consideration!

Originally posted by @HenryHZY in https://github.com/mlfoundations/open_flamingo/issues/129#issuecomment-1490285526

anas-awadalla avatar Mar 30 '23 16:03 anas-awadalla

As implied by the title we should allow users to train on only laion 2B. This should be very straightforward and involves making mmc4 arguments optional in train.py and refactoring the training loop on train_utils.py

anas-awadalla avatar Mar 30 '23 16:03 anas-awadalla

@anas-awadalla is it still open for contribution?

nayeem01 avatar Aug 08 '23 11:08 nayeem01

@nayeem01 Yes! We kept the previous PR out for too long and now it is outdated. Feel free to work on it.

anas-awadalla avatar Aug 08 '23 17:08 anas-awadalla

Noticed the linked PR. Is this open for contribution? @anas-awadalla

isaac-chung avatar Oct 04 '23 20:10 isaac-chung

Hi @isaac-chung. We have this implemented in #261. We would still love it if you contributed to a different issue :).

anas-awadalla avatar Oct 05 '23 14:10 anas-awadalla