多级多卡训练Qwen2.5vl7B卡住,一直卡在下图界面。
报错信息如下
ping: socket: Address family not supported by protocol
run sh: /opt/conda/bin/python -m torch.distributed.run --nproc_per_node 6 --master_port 29500 --nnodes 4 --node_rank 0 --master_addr 172.24.169.154 /opt/conda/lib/python3.10/site-packages/swift/cli/rlhf.py --train_type full --rlhf_type grpo --model /mnt/pfs-guan-ssai/nlu/wangluhan/model/Qwen2.5_vl_7 --external_plugins /mnt/pfs-guan-ssai/nlu/wangluhan/ms-swift/examples/train/grpo/plugin/my_plugin.py --reward_funcs cua_all_orm my_format --use_vllm true --vllm_device auto --vllm_gpu_memory_utilization 0.6 --vllm_max_model_len 3096 --vllm_limit_mm_per_prompt {"image": 3} --torch_dtype bfloat16 --dataset /mnt/pfs-guan-ssai/nlu/wangluhan/data/train_382/grpo_with_gt.json --max_length 3096 --max_new_tokens 128 --max_completion_length 128 --num_train_epochs 1 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --learning_rate 1e-5 --gradient_accumulation_steps 1 --save_strategy steps --eval_strategy steps --eval_steps 500 --save_steps 500 --save_total_limit 10 --logging_steps 5 --output_dir /mnt/pfs-guan-ssai/nlu/wangluhan/model/output --warmup_ratio 0.05 --dataloader_num_workers 4 --num_generations 6 --temperature 1.0 --log_completions true --num_iterations 1 --num_infer_workers 2 --beta 0.001 --report_to wandb --freeze_vit true
[W324 15:25:12.502360339 socket.cpp:752] [c10d] The client socket cannot be initialized to connect to [172-24-169-154.node-exporter.monitoring.svc.dev01-bcebj.local]:29500 (errno: 97 - Address family not supported by protocol).
上面信息出来后,一直卡住,显卡占用也是0%。
训练脚本如下
MASTER_IP=""
while [[ "$MASTER_IP" == "" ]]
do
MASTER_IP=ping ${MASTER_ADDR} -c 3 | sed '1{s/[^(]*(//;s/).*//;q}'
sleep 1
done
MASTER_ADDR=$MASTER_IP
MASTER_PORT=29500
NNODES=4
NPROC_PER_NODE=6
NODE_RANK=0
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
WANDB_API_KEY=23b19890fd5927691dcda12620842d247265880b
MAX_PIXELS=401408
swift rlhf
--train_type full
--rlhf_type grpo
--model xxx
--external_plugins xxx
--reward_funcs cua_all_orm my_format
--use_vllm true
--vllm_device auto
--vllm_gpu_memory_utilization 0.6
--vllm_max_model_len 3096
--vllm_limit_mm_per_prompt '{"image": 3}'
--torch_dtype bfloat16
--dataset xxx
--max_length 3096
--max_new_tokens 128
--max_completion_length 128
--num_train_epochs 1
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 1e-5
--gradient_accumulation_steps 1
--save_strategy 'steps'
--eval_strategy 'steps'
--eval_steps 500
--save_steps 500
--save_total_limit 10
--logging_steps 5
--output_dir xxx
--warmup_ratio 0.05
--dataloader_num_workers 4
--num_generations 6
--temperature 1.0
--log_completions true
--num_iterations 1
--num_infer_workers 2
--beta 0.001
--report_to wandb
--freeze_vit true \
其他节点也要 跑相应的shell
其他节点也要 跑相应的shell
其他节点也跑了的,就是到这一步会出现这个连接不上,然后timed out after 900000ms。