ms-swift icon indicating copy to clipboard operation
ms-swift copied to clipboard

GRPO训练Qwen3_VL_30B_A3B卡死

Open cockroach864 opened this issue 10 months ago • 4 comments

代码: `#!/usr/bin/env bash set -euo pipefail

NODE_RANK="${1:?need NODE_RANK (0/1)}" MASTER_ADDR="${2:?need MASTER_ADDR (node0 ip)}" MASTER_PORT="${3:-29500}"

export NNODES=2 export NODE_RANK="${NODE_RANK}" export MASTER_ADDR="${MASTER_ADDR}" export MASTER_PORT="${MASTER_PORT}"

export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 export NPROC_PER_NODE=8

export IMAGE_MAX_TOKEN_NUM=16384 export IMAGE_MIN_TOKEN_NUM=4 export PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True'

echo "[INFO] NNODES=${NNODES} NODE_RANK=${NODE_RANK} MASTER_ADDR=${MASTER_ADDR} MASTER_PORT=${MASTER_PORT} NPROC_PER_NODE=${NPROC_PER_NODE}" echo "[INFO] CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES}"

megatron rlhf
--rlhf_type grpo
--model ./output/hf_v20
--load_safetensors true
--save_safetensors true
--context_parallel_size 2
--tensor_model_parallel_size 2
--expert_model_parallel_size 4
--pipeline_model_parallel_size 2
--dataset ./all_data.json
--max_epochs 1
--global_batch_size 128
--micro_batch_size 2
--steps_per_generation 1
--num_generations 8
--external_plugins ./Navigation_reward.py
--reward_funcs format_reward parameter_reward
--use_vllm true
--vllm_mode colocate
--vllm_gpu_memory_utilization 0.3
--vllm_tensor_parallel_size 4
--vllm_max_model_len 8192
--max_length 4096
--max_completion_length 512
--train_type lora
--lr 5e-5
--bf16 true
--beta 0.00
--importance_sampling_level sequence
--save ./megatron_output/Qwen3-VL-30B-A3B-Instruct/nv_grpo_v21
--eval_interval 500
--save_interval 500
--epsilon 3e-4
--epsilon_high 4e-4
--dynamic_sample false
--overlong_filter true
--loss_type grpo
--sleep_level 2
--offload_model true
--offload_bridge false
--offload_optimizer true
--log_interval 1
--recompute_granularity selective
--finetune
--num_workers 8
--dataset_num_proc 8
--no_save_optim
--no_save_rng
--attention_backend flash
--temperature 1.0
--padding_free true
--sequence_parallel true
--log_completions true

训练代码如上,在训练中期,一直卡在一个这样的界面然后我就kill了,出现过好几次这个问题,请问应该怎么办

Image Image

cockroach864 avatar Jan 12 '26 02:01 cockroach864

retry with setting vllm_mm_processor_cache_gb 0 and vllm upgraded

hjh0119 avatar Jan 14 '26 07:01 hjh0119

same problem, pls keep me in the loop.

robotsp avatar Mar 06 '26 03:03 robotsp

mark

zkailinzhang avatar Mar 24 '26 08:03 zkailinzhang

please retry with latest swift and vllm, feel free to reopen or create a new issue if it the problem persists.

hjh0119 avatar Jun 24 '26 06:06 hjh0119