SHI-Labs / CuMo

CuMo: Scaling Multimodal LLM with Co-Upcycled Mixture-of-Experts
Apache License 2.0
132 stars 11 forks source link

Missing llava Directory for Training Script Execution #7

Closed makemecker closed 4 months ago

makemecker commented 4 months ago

Hello,

I am currently working on fine-tuning the CuMo model following the instructions in the "Getting Started" section of the repository. After downloading the necessary datasets and JSON files, the next step involves running the pre-training script for the MLP connector as shown below:

bash scripts/cumo/mistral_7b/pretrain_mistral_7b.sh

The contents of the pretrain_mistral_7b.sh script are as follows:

#!/bin/bash

deepspeed llava/train/train_mem.py \
    --deepspeed ./scripts/zero2.json \
    --model_name_or_path mistralai/Mistral-7B-Instruct-v0.2 \
    --version plain \
    --data_path $CuMo_DIR/data/llava/llava_pretrain/blip_laion_cc_sbu_558k.json \
    --image_folder $CuMo_DIR/data/llava/llava_pretrain/images \
    --vision_tower openai/clip-vit-large-patch14-336 \
    --vision_tower_dir $CuMo_DIR/checkpoints/clip-vit-large-patch14-336/pytorch_model.bin \
    --scales 1,3 \
    --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 $CuMo_DIR/checkpoints/cumo-mistral-7b-pretrain \
    --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 none

According to this script, deepspeed should execute the file llava/train/train_mem.py with specific parameters. However, I noticed that there is no llava directory in the repository. Instead, there is a cumo directory that contains a train directory with a train_mem.py file.

Could you please clarify if this is a typo in the script, and the path should actually be cumo/train/train_mem.py? Or is there an additional llava directory that needs to be downloaded separately?

Thank you for your assistance!

chrisjuniorli commented 4 months ago

Hi, that's should be cumo/train/train_mem.py, thanks for pointing it out and I just fixed them.