File size: 464 Bytes
535fb25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

GPUS_PER_NODE=8
NUM_MACHINES=4
NUM_PROCESSES=$((NUM_MACHINES * GPUS_PER_NODE))
MASTER_PORT=19001
MASTER_ADDR=10.82.139.22

RANK=$1

# Launch command using torchrun (native PyTorch distributed)
torchrun \
    --nproc_per_node=${GPUS_PER_NODE} \
    --nnodes=${NUM_MACHINES} \
    --node_rank=${RANK} \
    --master_addr=${MASTER_ADDR} \
    --master_port=${MASTER_PORT} \
    scripts/train_qwenimage.py \
    --config config/grpo.py:pickscore_qwenimage