Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving OOM Issues in train_control.py on 4 A100 GPUs (80GB Each) #102

Open
Beijia11 opened this issue Dec 22, 2024 · 0 comments
Open

Comments

@Beijia11
Copy link

My settings are as follows. Is there any way to reduce OOM (Out of Memory) issues?
CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch --main_process_ip=10.140.37.162 --main_process_port=12345 --num_machines=1 --num_processes=4 --machine_rank=0 scripts/train_control.py
--pretrained_model_name_or_path=$MODEL_NAME
--train_data_dir=$DATASET_NAME
--train_data_meta=$DATASET_META_NAME
--image_sample_size=1024
--video_sample_size=256
--token_sample_size=512
--video_sample_stride=3
--video_sample_n_frames=49
--train_batch_size=1
--video_repeat=1
--gradient_accumulation_steps=4
--dataloader_num_workers=1
--num_train_epochs=100
--checkpointing_steps=50
--learning_rate=2e-05
--lr_scheduler="constant_with_warmup"
--lr_warmup_steps=50
--seed=43
--output_dir="output_dir"
--gradient_checkpointing
--mixed_precision="bf16"
--adam_weight_decay=3e-2
--adam_epsilon=1e-10
--vae_mini_batch=1
--max_grad_norm=0.05
--random_hw_adapt
--training_with_video_token_length
--enable_bucket
--trainable_modules "."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant