vllm016.dev.qwen3_5镜像训练Qwen3-next报错:
环境:verl官方镜像:vllm016.dev.qwen3_5 模型:Qwen3-next-coder 脚本:run_qwen3next_80b_fsdp_npu.sh修改数据 报错: Watchdog caught collective operation timeout: WorkNCCL(SeqNum=262, OpType=ALLTOALL, ... Timeout(ms)=1800000) 报错推测:不是vllm推理的问题,应该是fsdp训练时hang住,之后nccl timeout
训练脚本
`#!/usr/bin/env bash set -xeuo pipefail
project_name="verl_grpo_qwen3-next-80b" experiment_name="Qwen3_Next_80B_Instruct_docker"
Paths
WORK_DIR=${WORK_DIR:-"${HOME}/verl"} MODEL_PATH=/apdcephfs_bjzf/share_304704649/hefengjiang/Qwen3-Coder-Next TRAIN_FILE=/apdcephfs_cq8/share_300190258/hhangxu/bird_king/BIRD-Text2SQL/verl/data/dapo-math-17k.parquet TEST_FILE=/apdcephfs_cq8/share_300190258/hhangxu/bird_king/BIRD-Text2SQL/verl/data/aime-2024.parquet
algorithm
adv_estimator=grpo
use_kl_in_reward=False kl_coef=0.0 use_kl_loss=True kl_loss_coef=0.001
clip_ratio_low=0.2 clip_ratio_high=0.28
temperature=1.0 top_p=1.0 top_k=-1 # 0 for HF rollout, -1 for vLLM rollout val_top_p=0.7
batch
train_batch_size=4 rollout_n=4 ppo_mini_batch_size=4
length
max_prompt_length=$((1024 * 2)) max_response_length=$((1024 * 2))
algorithm
learning_rate=1e-6 warmup_steps=0
enable_filter_groups=True
performance
sp_size=1 gen_tp=4 use_dynamic_bsz=True actor_ppo_max_token_len=$(((max_prompt_length + max_response_length) / sp_size)) infer_ppo_max_token_len=$(((max_prompt_length + max_response_length) / sp_size)) offload=True
DATA=( data.train_files="${TRAIN_FILE}" data.val_files="${TEST_FILE}" data.train_batch_size=${train_batch_size} data.max_prompt_length=${max_prompt_length} data.max_response_length=${max_response_length} data.truncation='error' )
ACTOR=( actor_rollout_ref.actor.strategy=fsdp2 actor_rollout_ref.nccl_timeout=14400
# fsdp
actor_rollout_ref.actor.fsdp_config.use_orig_params=True
actor_rollout_ref.actor.fsdp_config.model_dtype=bfloat16
actor_rollout_ref.actor.fsdp_config.param_offload=${offload}
actor_rollout_ref.actor.fsdp_config.optimizer_offload=${offload}
actor_rollout_ref.actor.fsdp_config.forward_prefetch=False
actor_rollout_ref.actor.fsdp_config.fsdp_size=-1
+actor_rollout_ref.actor.fsdp_config.mixed_precision.reduce_dtype=bf16
# optimizer
actor_rollout_ref.actor.optim.lr=${learning_rate}
actor_rollout_ref.actor.optim.lr_warmup_steps=${warmup_steps}
# ppo config
actor_rollout_ref.actor.ppo_mini_batch_size=${ppo_mini_batch_size}
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=1
actor_rollout_ref.actor.ppo_max_token_len_per_gpu=${actor_ppo_max_token_len}
actor_rollout_ref.actor.ulysses_sequence_parallel_size=${sp_size}
# entropy
actor_rollout_ref.actor.entropy_checkpointing=True
actor_rollout_ref.actor.entropy_from_logits_with_chunking=True
actor_rollout_ref.actor.use_kl_loss=${use_kl_loss}
actor_rollout_ref.actor.kl_loss_coef=${kl_loss_coef}
actor_rollout_ref.actor.kl_loss_type=low_var_kl
actor_rollout_ref.actor.clip_ratio_low=${clip_ratio_low}
actor_rollout_ref.actor.clip_ratio_high=${clip_ratio_high}
actor_rollout_ref.actor.clip_ratio_c=10.0
actor_rollout_ref.actor.use_dynamic_bsz=${use_dynamic_bsz}
actor_rollout_ref.actor.use_torch_compile=False
)
ROLLOUT=( actor_rollout_ref.rollout.name=vllm actor_rollout_ref.rollout.n=${rollout_n} actor_rollout_ref.rollout.tensor_model_parallel_size=${gen_tp} actor_rollout_ref.rollout.gpu_memory_utilization=0.8 actor_rollout_ref.rollout.load_format=auto actor_rollout_ref.rollout.enforce_eager=True actor_rollout_ref.rollout.max_num_batched_tokens=$((max_prompt_length + max_response_length)) actor_rollout_ref.rollout.calculate_log_probs=True
actor_rollout_ref.rollout.temperature=${temperature}
actor_rollout_ref.rollout.top_p=${top_p}
actor_rollout_ref.rollout.top_k=${top_k}
actor_rollout_ref.rollout.val_kwargs.temperature=${temperature}
actor_rollout_ref.rollout.val_kwargs.top_p=${val_top_p}
actor_rollout_ref.rollout.val_kwargs.top_k=${top_k}
actor_rollout_ref.rollout.val_kwargs.do_sample=True
actor_rollout_ref.rollout.val_kwargs.n=1
actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=1
actor_rollout_ref.rollout.log_prob_use_dynamic_bsz=${use_dynamic_bsz}
actor_rollout_ref.rollout.log_prob_max_token_len_per_gpu=${infer_ppo_max_token_len}
)
REF=( actor_rollout_ref.ref.ulysses_sequence_parallel_size=${sp_size} actor_rollout_ref.ref.use_torch_compile=False actor_rollout_ref.ref.fsdp_config.param_offload=${offload} actor_rollout_ref.ref.fsdp_config.optimizer_offload=${offload} actor_rollout_ref.ref.fsdp_config.forward_prefetch=False
actor_rollout_ref.ref.entropy_checkpointing=True
actor_rollout_ref.ref.entropy_from_logits_with_chunking=True
actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=1
actor_rollout_ref.ref.log_prob_use_dynamic_bsz=${use_dynamic_bsz}
actor_rollout_ref.ref.log_prob_max_token_len_per_gpu=${infer_ppo_max_token_len}
)
TRAINER=( trainer.logger='["console"]' trainer.project_name="${project_name}" trainer.experiment_name="${experiment_name}" trainer.n_gpus_per_node=8 trainer.nnodes=1 trainer.val_before_train=False trainer.save_freq=5 trainer.test_freq=-1 trainer.total_epochs=1 # trainer.device=npu )
MODEL=( actor_rollout_ref.model.path=${MODEL_PATH} actor_rollout_ref.model.use_remove_padding=True actor_rollout_ref.model.enable_activation_offload=${offload} )
ALGORITHM=( algorithm.adv_estimator=${adv_estimator} algorithm.use_kl_in_reward=${use_kl_in_reward} algorithm.kl_ctrl.kl_coef=${kl_coef} )
=========================================================
echo "Starting Training with:" echo "Project: ${project_name}, Exp: ${experiment_name}" echo "Rollout N: ${rollout_n}, Batch Size: ${train_batch_size}, LR: ${learning_rate}"
python3 -m verl.trainer.main_ppo
"${DATA[@]}"
"${ACTOR[@]}"
"${ROLLOUT[@]}"
"${REF[@]}"
"${TRAINER[@]}"
"${ALGORITHM[@]}"
"${MODEL[@]}"
`
详细报错
(WorkerDict pid=3934735) [rank7]:[E226 16:00:37.342220332 ProcessGroupNCCL.cpp:685] [Rank 1] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=262, OpType=ALLTOALL, NumelIn=4493312, NumelOut=4493312, Timeout(ms)=1800000) ran for 1800082 milliseconds before timing out. (WorkerDict pid=3934735) [rank7]:[E226 16:00:37.342550291 ProcessGroupNCCL.cpp:2252] [PG ID 2 PG GUID 6(mesh_sp) Rank 1] failure detected by watchdog at work sequence id: 262 PG status: last enqueued work: 265, last completed work: 261 (WorkerDict pid=3934735) [rank7]:[E226 16:00:37.342559100 ProcessGroupNCCL.cpp:732] Stack trace of the failed collective not found, potentially because FlightRecorder is disabled. You can enable it by setting TORCH_NCCL_TRACE_BUFFER_SIZE to a non-zero value. (WorkerDict pid=3934735) [rank7]:[E226 16:00:37.342606426 ProcessGroupNCCL.cpp:2584] [PG ID 2 PG GUID 6(mesh_sp) Rank 1] First PG on this rank to signal dumping. (WorkerDict pid=3934728) [rank0]:[E226 16:00:37.807344500 ProcessGroupNCCL.cpp:1806] [PG ID 0 PG GUID 0(default_pg) Rank 0] Observed flight recorder dump signal from another rank via TCPStore. (WorkerDict pid=3934728) [rank0]:[E226 16:00:37.807442311 ProcessGroupNCCL.cpp:1870] [PG ID 0 PG GUID 0(default_pg) Rank 0] Received a dump signal due to a collective timeout from rank 7 and we will try our best to dump the debug info. Last enqueued NCCL work: 223538, last completed NCCL work: 223536.This is most likely caused by incorrect usages of collectives, e.g., wrong sizes used across ranks, the order of collectives is not same for all ranks or the scheduled collective, for some reason, didn't run. Additionally, this can be caused by GIL deadlock or other reasons such as network errors or bugs in the communications library (e.g. NCCL), etc. (WorkerDict pid=3934728) [rank0]:[E226 16:00:37.807725265 ProcessGroupNCCL.cpp:1589] [PG ID 0 PG GUID 0(default_pg) Rank 0] ProcessGroupNCCL preparing to dump debug info. Include stack trace: 1 (WorkerDict pid=3934730) NCCL version 2.27.3+cuda12.9 (WorkerDict pid=3934735) [rank7]:[E226 16:00:37.807258858 ProcessGroupNCCL.cpp:1870] [PG ID 0 PG GUID 0(default_pg) Rank 7] Received a dump signal due to a collective timeout from this local rank and we will try our best to dump the debug info. Last enqueued NCCL work: 223538, last completed NCCL work: 223536.This is most likely caused by incorrect usages of collectives, e.g., wrong sizes used across ranks, the order of collectives is not same for all ranks or the scheduled collective, for some reason, didn't run. Additionally, this can be caused by GIL deadlock or other reasons such as network errors or bugs in the communications library (e.g. NCCL), etc. (WorkerDict pid=3934735) [rank7]:[E226 16:01:37.342698289 ProcessGroupNCCL.cpp:746] [Rank 1] Some NCCL operations have failed or timed out. Due to the asynchronous nature of CUDA kernels, subsequent GPU operations might run on corrupted/incomplete data. (WorkerDict pid=3934735) [rank7]:[E226 16:01:37.342748714 ProcessGroupNCCL.cpp:760] [Rank 1] To avoid data inconsistency, we are taking the entire process down. (WorkerDict pid=3934735) [rank7]:[E226 16:01:37.343451509 ProcessGroupNCCL.cpp:2068] [PG ID 2 PG GUID 6(mesh_sp) Rank 1] Process group watchdog thread terminated with exception: [Rank 1] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=262, OpType=ALLTOALL, NumelIn=4493312, NumelOut=4493312, Timeout(ms)=1800000) ran for 1800082 milliseconds before timing out. (WorkerDict pid=3934735) Exception raised from checkTimeout at /pytorch/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:688 (most recent call first): (WorkerDict pid=3934735) frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x80 (0x7fe8a453aeb0 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libc10.so) (WorkerDict pid=3934735) frame #1: c10d::ProcessGroupNCCL::WorkNCCL::checkTimeout(std::optional<std::chrono::duration<long, std::ratio<1l, 1000l> > >) + 0x247 (0x7fb91cb68147 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #2: c10d::ProcessGroupNCCL::Watchdog::runLoop() + 0x1591 (0x7fb91cb6bb61 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #3: c10d::ProcessGroupNCCL::Watchdog::run() + 0xd2 (0x7fb91cb6cec2 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #4: <unknown function> + 0xdf0e6 (0x7fe8ef58d0e6 in /opt/conda/envs/verl/bin/../lib/libstdc++.so.6) (WorkerDict pid=3934735) frame #5: <unknown function> + 0x81ca (0x7fe8ffa9c1ca in /lib64/libpthread.so.0) (WorkerDict pid=3934735) frame #6: clone + 0x43 (0x7fe8fef8b8d3 in /lib64/libc.so.6) (WorkerDict pid=3934735) (WorkerDict pid=3934735) [2026-02-26 16:01:37,057 E 3934735 3936417] logging.cc:118: Unhandled exception: N3c1016DistBackendErrorE. what(): [PG ID 2 PG GUID 6(mesh_sp) Rank 1] Process group watchdog thread terminated with exception: [Rank 1] Watchdog caught collective operation timeout: WorkNCCL(SeqNum=262, OpType=ALLTOALL, NumelIn=4493312, NumelOut=4493312, Timeout(ms)=1800000) ran for 1800082 milliseconds before timing out. (WorkerDict pid=3934735) Exception raised from checkTimeout at /pytorch/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:688 (most recent call first): (WorkerDict pid=3934735) frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x80 (0x7fe8a453aeb0 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libc10.so) (WorkerDict pid=3934735) frame #1: c10d::ProcessGroupNCCL::WorkNCCL::checkTimeout(std::optional<std::chrono::duration<long, std::ratio<1l, 1000l> > >) + 0x247 (0x7fb91cb68147 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #2: c10d::ProcessGroupNCCL::Watchdog::runLoop() + 0x1591 (0x7fb91cb6bb61 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #3: c10d::ProcessGroupNCCL::Watchdog::run() + 0xd2 (0x7fb91cb6cec2 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #4: <unknown function> + 0xdf0e6 (0x7fe8ef58d0e6 in /opt/conda/envs/verl/bin/../lib/libstdc++.so.6) (WorkerDict pid=3934735) frame #5: <unknown function> + 0x81ca (0x7fe8ffa9c1ca in /lib64/libpthread.so.0) (WorkerDict pid=3934735) frame #6: clone + 0x43 (0x7fe8fef8b8d3 in /lib64/libc.so.6) (WorkerDict pid=3934735) (WorkerDict pid=3934735) Exception raised from run at /pytorch/torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp:2074 (most recent call first): (WorkerDict pid=3934735) frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) + 0x80 (0x7fe8a453aeb0 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libc10.so) (WorkerDict pid=3934735) frame #1: <unknown function> + 0xe1c1a1 (0x7fb91cb441a1 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #2: <unknown function> + 0x9468e6 (0x7fb91c66e8e6 in /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so) (WorkerDict pid=3934735) frame #3: <unknown function> + 0xdf0e6 (0x7fe8ef58d0e6 in /opt/conda/envs/verl/bin/../lib/libstdc++.so.6) (WorkerDict pid=3934735) frame #4: <unknown function> + 0x81ca (0x7fe8ffa9c1ca in /lib64/libpthread.so.0) (WorkerDict pid=3934735) frame #5: clone + 0x43 (0x7fe8fef8b8d3 in /lib64/libc.so.6) (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x170be2a) [0x7fe8f0fc0e2a] ray::operator<<() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x170c8dc) [0x7fe8f0fc18dc] ray::RayLog::operator<< <>() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x883cc1) [0x7fe8f0138cc1] ray::TerminateHandler() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xc2519) [0x7fe8ef570519] __cxxabiv1::__terminate() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(_ZSt10unexpectedv+0) [0x7fe8ef56a063] std::unexpected() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xc2512) [0x7fe8ef570512] __cxxabiv1::__terminate() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so(+0x94696a) [0x7fb91c66e96a] c10d::ProcessGroupNCCL::Watchdog::run() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xdf0e6) [0x7fe8ef58d0e6] execute_native_thread_routine (WorkerDict pid=3934735) /lib64/libpthread.so.0(+0x81ca) [0x7fe8ffa9c1ca] start_thread (WorkerDict pid=3934735) /lib64/libc.so.6(clone+0x43) [0x7fe8fef8b8d3] clone (WorkerDict pid=3934735) (WorkerDict pid=3934735) [2026-02-26 16:01:37,059 E 3934735 3936417] logging.cc:125: Stack trace: (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x170be2a) [0x7fe8f0fc0e2a] ray::operator<<() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x170c8dc) [0x7fe8f0fc18dc] ray::RayLog::operator<< <>() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/ray/_raylet.so(+0x170ee98) [0x7fe8f0fc3e98] ray::TerminateHandler() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xc2519) [0x7fe8ef570519] __cxxabiv1::__terminate() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(_ZSt10unexpectedv+0) [0x7fe8ef56a063] std::unexpected() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xc2512) [0x7fe8ef570512] __cxxabiv1::__terminate() (WorkerDict pid=3934735) /opt/conda/envs/verl/lib/python3.12/site-packages/torch/lib/libtorch_cuda.so(+0x94696a) [0x7fb91c66e96a] c10d::ProcessGroupNCCL::Watchdog::run() (WorkerDict pid=3934735) /opt/conda/envs/verl/bin/../lib/libstdc++.so.6(+0xdf0e6) [0x7fe8ef58d0e6] execute_native_thread_routine (WorkerDict pid=3934735) /lib64/libpthread.so.0(+0x81ca) [0x7fe8ffa9c1ca] start_thread (WorkerDict pid=3934735) /lib64/libc.so.6(clone+0x43) [0x7fe8fef8b8d3] clone (WorkerDict pid=3934735) (WorkerDict pid=3934735) *** SIGABRT received at time=1772092897 on cpu 217 *** (WorkerDict pid=3934735) PC: @ 0x7fe8fefa052f (unknown) raise (WorkerDict pid=3934735) @ 0x7fe8ffaa6990 4832 (unknown) (WorkerDict pid=3934735) @ 0x7fe8ef570519 (unknown) __cxxabiv1::__terminate() (WorkerDict pid=3934735) @ 0x7fb52c0077a0 1064016384 (unknown) (WorkerDict pid=3934735) @ 0x7fb95d664f30 (unknown) (unknown) (WorkerDict pid=3934734) [rank6]:[E226 16:00:37.807338380 ProcessGroupNCCL.cpp:1806] [PG ID 0 PG GUID 0(default_pg) Rank 6] Observed flight recorder dump signal from another rank via TCPStore. [repeated 6x across cluster]
那个镜像有问题,不要用
那个镜像有问题,不要用
目前可以使用的最新镜像是哪个,需要训练qwen3-next
@ISEEKYAN 现在推荐使用什么镜像啊~
qwen3next的话用0.12那个镜像就行。现在0.15和0.16的镜像都没适配好,也可以自己编译sglang的镜像试试。
qwen3next的话用0.12那个镜像就行。现在0.15和0.16的镜像都没适配好,也可以自己编译sglang的镜像试试。
@ISEEKYAN 您好,请问vllm016.dev.qwen3_5镜像支持对qwen3.5系列模型的RL训练吗
是镜像整体的问题,还是vllm0.16.0的问题呢? 我也遇到了差不多的问题
现在有verl的版本能适配vllm 0.16吗
vllm016.dev.qwen3_5这个镜像的vllm有点问题(tp只能开1)
Please use latest stable image: verlai/verl:vllm017.latest