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

训练Qwen3-VL-30B-A3B-Thinking,开启deepspeed的zero2/3就会报错

Open cgd-bot opened this issue 8 months ago • 4 comments

Checklist / 检查清单

  • [x] I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。

Bug Description / Bug 描述

训练Qwen3-VL-30B-A3B-Thinking,开启deepspeed的zero2/3就会报错,不使用deepspeed能正常训练

How to Reproduce / 如何复现

ms-swift 的版本: 4.0 运行环境: 8*A800

model_name_or_path=Qwen3-VL-30B-A3B-Thinking

swift sft
--model $model_name_or_path
--dataset $dataset
--load_from_cache_file true
--split_dataset_ratio 0.01
--tuner_type lora
--torch_dtype bfloat16
--num_train_epochs $num_train_epochs
--per_device_train_batch_size $per_device_train_batch_size
--per_device_eval_batch_size $per_device_eval_batch_size
--attn_impl flash_attn
--padding_free true
--learning_rate $learning_rate
--lora_rank $lora_rank
--lora_alpha $lora_alpha
--target_modules all-linear
--router_aux_loss_coef 1e-3
--experts_impl grouped_mm
--freeze_vit true
--freeze_aligner true
--gradient_accumulation_steps $gradient_accumulation_steps
--gradient_checkpointing true
--eval_steps $eval_steps
--save_steps $save_steps
--save_total_limit -1
--logging_steps $logging_steps
--max_length $max_length
--output_dir $output_dir
--warmup_ratio $warmup_ratio
--dataset_num_proc 128
--dataloader_num_workers 64
--deepspeed zero2

报错信息: [rank0]: AttributeError: 'Qwen3VLModelOutputWithPast' object has no attribute 'router_logits'

Additional Information / 补充信息

No response

cgd-bot avatar Mar 03 '26 10:03 cgd-bot

同样的问题,使用swift==4.0.0, transformers==5.2.0, torch==2.8.0

zeta-zl avatar Mar 17 '26 08:03 zeta-zl

同样的问题,使用swift==4.0.1, transformers==5.3.0, torch==2.10.0

freeneuro avatar Mar 20 '26 01:03 freeneuro

+1,up

cxmscb avatar Mar 26 '26 02:03 cxmscb

我看看

Jintao-Huang avatar Mar 26 '26 03:03 Jintao-Huang