modelscope / modelscope/ms-swift

多机训练是会卡住

Open
#6,982 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
15.7k
Forks
1.7k
Avg merge
1d 16h
Merged PRs (30d)
136

Description

nnodes=2
nproc_per_node=4

CUDA_VISIBLE_DEVICES=0,1,2,3
NNODES=$nnodes
NODE_RANK=0
MASTER_ADDR=127.0.0.1
MASTER_PORT=28350
NPROC_PER_NODE=$nproc_per_node
swift sft
--model /data/weights/Qwen/Qwen3-14B
--train_type lora
--dataset '/data/ms-swift/swift/llm/dataset/data/merged.json'
--load_from_cache_file true
--split_dataset_ratio 0.01
--torch_dtype bfloat16
--num_train_epochs 1
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 1e-5
--gradient_accumulation_steps $(expr 32 / $nproc_per_node / $nnodes)
--eval_steps 100
--save_steps 100
--save_total_limit 2
--logging_steps 5
--max_length 8192
--output_dir output
--system 'You are a helpful assistant.'
--warmup_ratio 0.05
--dataloader_num_workers 4
--deepspeed zero3
我的指令,看着通信成功,但是执行到[INFO:swift] model_kwargs: {'device_map': None, 'dtype': torch.bfloat16}直接卡住。

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied two-node swift sft command and inspect the distributed startup path around the model_kwargs log line. Confirm whether execution progresses past that point, then identify the cause of the multi-node hang and verify the fix with the same configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.