modelscope / modelscope/ms-swift
Qwen-30B-A3B-Instruct在npu上sft之后输出奇怪结果
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- 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的多轮数据,训练完毕后推理会出现奇怪的输出:
训练过程的指标如下:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the listed swift sft command on the 910c four-node setup, using the referenced dataset and checkpoint output. Compare inference before and after training and inspect the attached training metrics and node logs to narrow down whether the unusual output is introduced during SFT or inference. Done means the failure is isolated and a verified post-SFT result is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100