-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_pretrain_wan.sh
38 lines (34 loc) · 1.12 KB
/
run_pretrain_wan.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# 清除屏幕
clear
# 设置训练参数
MODEL_SAVE_DIR="./model_save/pretrain_wan"
BATCH_SIZE=6
GRADIENT_ACCUMULATION_STEPS=4
NUM_TRAIN_EPOCHS=1
WEIGHT_DECAY=0.1
LEARNING_RATE=1e-4
SAVE_STEPS=50
LOGGING_STEPS=20
WARMUP_STEPS=1000
# 执行训练脚本
accelerate launch --multi_gpu --config_file accelerate_multi_gpu.yaml pretrain_wan.py \
--model_save_dir $MODEL_SAVE_DIR \
--train_batch_size $BATCH_SIZE \
--gradient_accumulation_steps $GRADIENT_ACCUMULATION_STEPS \
--num_train_epochs $NUM_TRAIN_EPOCHS \
--weight_decay $WEIGHT_DECAY \
--learning_rate $LEARNING_RATE \
--save_steps $SAVE_STEPS \
--logging_steps $LOGGING_STEPS\
--warmup_steps $WARMUP_STEPS\
# torchrun --standalone --nproc_per_node=8 pretrain_wan.py \
# --model_save_dir $MODEL_SAVE_DIR \
# --train_batch_size $BATCH_SIZE \
# --gradient_accumulation_steps $GRADIENT_ACCUMULATION_STEPS \
# --num_train_epochs $NUM_TRAIN_EPOCHS \
# --weight_decay $WEIGHT_DECAY \
# --learning_rate $LEARNING_RATE \
# --save_steps $SAVE_STEPS \
# --logging_steps $LOGGING_STEPS\
# --warmup_steps $WARMUP_STEPS\