forked from NVlabs/VILA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NVlabs#88 from XueFuzhao/main
Fix SP Grad Flow
- Loading branch information
Showing
35 changed files
with
159 additions
and
92 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,20 +1,16 @@ | ||
#!/bin/bash | ||
#SBATCH --job-name=vila-7b-internvid10m-pretraining:nvr_lpr_aiagent | ||
#SBATCH --nodes=32 | ||
#SBATCH --nodes=16 | ||
#SBATCH --gres=gpu:8 | ||
#SBATCH --time=4:00:00 | ||
#SBATCH -A nvr_lpr_aiagent | ||
<<<<<<< HEAD | ||
#SBATCH --partition=grizzly,polar,polar2,polar3,polar4 | ||
======= | ||
#SBATCH --partition=grizzly,polar,,polar2,polar3,polar4 | ||
>>>>>>> 4f906a9425c2318c89084b2a7eda650bc32f05ac | ||
#SBATCH --exclusive | ||
#SBATCH --dependency=singleton | ||
#SBATCH --output=7b-internvid-10m-ego1m-training.out | ||
|
||
|
||
# srun --label bash ~/workspace/VILA-Internal/scripts/v1_5/video/1_train_projector_vicuna13b_siglipso400m.sh | ||
srun --label bash ~/workspace/VILA-Internal/scripts/v1_5/video/2_train_mmc4_coyo_sharegpt4v_internvid10m_ego4d1m_vicuna_siglipso400m_video.sh | ||
srun --label bash ~/workspace/VILA-Internal/scripts/v1_5/video/1_mm_align.sh | ||
# srun --label bash ~/workspace/VILA-Internal/scripts/v1_5/video/3_sft_videov2_siglipso400m_2.sh | ||
|
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,56 @@ | ||
#!/bin/bash | ||
source /lustre/fsw/portfolios/nvr/users/${USER}/anaconda3/bin/activate | ||
conda init | ||
source ~/.bashrc | ||
conda activate vila | ||
which python | ||
|
||
cd ~/workspace/VILA-Internal | ||
|
||
master_addr=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n 1) | ||
export MASTER_ADDR=$master_addr | ||
echo "MASTER_ADDR="$MASTER_ADDR | ||
|
||
n_node=$SLURM_JOB_NUM_NODES | ||
bs=$((128 * 4 / n_node)) | ||
echo "number of nodes:" $n_node | ||
echo "per device batch size:" $bs | ||
echo "node rank:" $SLURM_PROCID | ||
|
||
torchrun --nnodes=$n_node --nproc_per_node=8 --master_port=25001 \ | ||
--master_addr $MASTER_ADDR --node_rank=$SLURM_PROCID \ | ||
llava/train/train_hybrid.py \ | ||
--deepspeed ./scripts/zero3.json \ | ||
--model_name_or_path /home/ligengz/downloads/Meta-Llama-3-8B-Instruct \ | ||
--version plain \ | ||
--data_mixture llava_1_5_mm_align \ | ||
--vision_tower google/siglip-so400m-patch14-384 \ | ||
--mm_vision_select_feature cls_patch \ | ||
--mm_projector mlp_downsample \ | ||
--tune_mm_projector True \ | ||
--mm_vision_select_layer -2 \ | ||
--mm_use_im_start_end False \ | ||
--mm_use_im_patch_token False \ | ||
--image_aspect_ratio resize \ | ||
--bf16 True \ | ||
--output_dir ./checkpoints/vilavideo-llama3-8b-spdebug \ | ||
--num_train_epochs 1 \ | ||
--per_device_train_batch_size $bs \ | ||
--per_device_eval_batch_size 4 \ | ||
--gradient_accumulation_steps 1 \ | ||
--evaluation_strategy "no" \ | ||
--save_strategy "steps" \ | ||
--save_steps 20000 \ | ||
--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 4096 \ | ||
--gradient_checkpointing True \ | ||
--dataloader_num_workers 8 \ | ||
--lazy_preprocess True \ | ||
--report_to wandb \ | ||
--seq_parallel_size 4 |
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,56 @@ | ||
#!/bin/bash | ||
source /lustre/fsw/portfolios/nvr/users/${USER}/anaconda3/bin/activate | ||
conda init | ||
source ~/.bashrc | ||
conda activate vila | ||
which python | ||
|
||
cd ~/workspace/VILA-Internal | ||
|
||
master_addr=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n 1) | ||
export MASTER_ADDR=$master_addr | ||
echo "MASTER_ADDR="$MASTER_ADDR | ||
|
||
n_node=$SLURM_JOB_NUM_NODES | ||
bs=$((4 * 4 / n_node)) | ||
echo "number of nodes:" $n_node | ||
echo "per device batch size:" $bs | ||
echo "node rank:" $SLURM_PROCID | ||
|
||
torchrun --nnodes=$n_node --nproc_per_node=8 --master_port=25001 \ | ||
--master_addr $MASTER_ADDR --node_rank=$SLURM_PROCID \ | ||
llava/train/train_hybrid.py \ | ||
--deepspeed ./scripts/zero3.json \ | ||
--model_name_or_path /home/ligengz/downloads/Meta-Llama-3-8B-Instruct \ | ||
--version plain \ | ||
--data_mixture llava_1_5_mm_align \ | ||
--vision_tower google/siglip-so400m-patch14-384 \ | ||
--mm_vision_select_feature cls_patch \ | ||
--mm_projector mlp_downsample \ | ||
--tune_mm_projector True \ | ||
--mm_vision_select_layer -2 \ | ||
--mm_use_im_start_end False \ | ||
--mm_use_im_patch_token False \ | ||
--image_aspect_ratio resize \ | ||
--bf16 True \ | ||
--output_dir ./checkpoints/vilavideo-llama3-8b-spdebug-test \ | ||
--num_train_epochs 1 \ | ||
--per_device_train_batch_size $bs \ | ||
--per_device_eval_batch_size 4 \ | ||
--gradient_accumulation_steps 1 \ | ||
--evaluation_strategy "no" \ | ||
--save_strategy "steps" \ | ||
--save_steps 20000 \ | ||
--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 4096 \ | ||
--gradient_checkpointing True \ | ||
--dataloader_num_workers 8 \ | ||
--lazy_preprocess True \ | ||
--report_to wandb \ | ||
--seq_parallel_size 4 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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