mlfoundations / open_flamingo

An open-source framework for training large multimodal models.
MIT License
3.76k stars 286 forks source link

support training on only LAION 2B #137

Open anas-awadalla opened 1 year ago

anas-awadalla commented 1 year ago
          @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 commented 1 year ago

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

nayeem01 commented 1 year ago

@anas-awadalla is it still open for contribution?

anas-awadalla commented 1 year ago

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

isaac-chung commented 1 year ago

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

anas-awadalla commented 1 year ago

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