Qwen-30B-A3B-Instruct在npu上sft之后输出奇怪结果
Checklist / 检查清单
- [x] I have searched existing issues, and this is a new question or discussion topic. / 我已经搜索过现有的 issues,确认这是一个新的问题与讨论。
Question Description / 问题描述
我在910c上对Qwen-30B-A3B-Instruct做SFT,一共使用4个节点,训练脚本如下:
==================== 启动训练 ====================
ASCEND_DEVICE_ID=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
NNODES=$NNODES
NODE_RANK=0
MASTER_ADDR=ip
MASTER_PORT=29501
NPROC_PER_NODE=$NPROC_PER_NODE
swift sft
--model /path/Qwen3-30B-A3B-Instruct-2507
--tuner_type full
--dataset /path/data
--torch_dtype bfloat16
--split_dataset_ratio 0.1
--num_train_epochs 3
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 1e-6
--gradient_accumulation_steps 16
--router_aux_loss_coef 1e-3
--experts_impl grouped_mm
--eval_steps 50
--save_steps 50
--logging_steps 5
--max_length 64000
--dataloader_num_workers 8
--dataset_num_proc 8
--save_total_limit 20
--save_only_model true
--output_dir ./checkpoint/deepresearch_30b_search_only_32k_think_single_sys
--deepspeed zero3
--attn_impl flash_attention_2
--sequence_parallel_size 4
2>&1 | tee "${OUTPUT_DIR}/train_node${NODE_RANK}.log"
数据格式为agentic search的多轮数据,训练完毕后推理会出现奇怪的输出:
训练过程的指标如下:
推理使用 swift infer --model
@Jintao-Huang
meet error for swift infer:
RuntimeError: copy_d2d:build/CMakeFiles/torch_npu.dir/compiler_depend.ts:285 NPU function error: c10_npu::acl::AclrtSynchronizeStreamWithTimeout(copy_stream), error code is 507001 [ERROR] 2026-02-28-06:29:37 (PID:33536, Device:12, RankID:-1) ERR00100 PTA call acl api failed [Error]: An internal error occurs in the task scheduler module on the device. Rectify the fault based on the error information in the ascend log. EI9999: Inner Error! The error from device(chipId:6, dieId:0), serial number is 1. there is a sdma error, sdma channel is 21, sdmaBlkFsmState=0x7, dfxSdmaBlkFsmOstCnt=0x0, sdmaChFree=0x0, irqStatus=0x220000, cqeStatus=0x3 [FUNC:RecordSdmaErrorInfoForNonDavid][FILE:device_error_proc.cc][LINE:1544] EI9999[PID: 33536] 2026-02-28-06:29:37.601.366 (EI9999): Memory async copy failed, device_id=12, stream_id=2, task_id=71, flip_num=0, copy_type=2, memcpy_type=0, copy_data_type=0, length=2304[FUNC:GetError][FILE:stream.cc][LINE:1191] TraceBack (most recent call last): rtStreamSynchronizeWithTimeout execute failed, reason=[task exception][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53] synchronize stream with timeout failed, runtime result = 507001[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:162]
swift infer是直接走transformers推理吗?但是看vllm对30b moe inference是没有bug的 @Jintao-Huang
This issue has been inactive for over 3 months and will be automatically closed in 7 days. If this issue is still relevant, please reply to this message.
可以通过--infer_backend指定