modelscope / modelscope/ms-swift
qwen3-235b megatron pipeline并行报错
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
硬件:pai DLC平台,双机16卡 810 PPU
ms-swift:最新main分支代码
命令如下
megatron sft
--model /mnt/data/OpenModels/Qwen3-235B-A22B-Instruct-2507
--dataset
'qwen3_235b_2507_distill_110k_loss_channel.jsonl'
--load_safetensors true
--save_safetensors true
--merge_lora true
--split-dataset-ratio 0.01
--train_type lora
--lora_rank 64
--lora_alpha 128
--target_modules all-linear
--pipeline_model_parallel_size 4
--tensor_model_parallel_size 1
--expert_tensor_parallel_size 1
--expert_model_parallel_size 4
--decoder_last_pipeline_num_layers 22
--moe_permute_fusion true
--moe_grouped_gemm true
--moe_shared_expert_overlap true
--moe_aux_loss_coeff 1.0e-3
--tp_comm_overlap false
--overlap_grad_reduce true
--overlap_param_gather true
--packing true
--padding_free true
--sequence_parallel true
--micro_batch_size 1
--global_batch_size 64
--recompute_granularity full
--recompute_method uniform
--recompute_num_layers 1
--max_epochs 2
--eval_iters 256
--finetune true
--loss_scale last_round
--cross_entropy_loss_fusion true
--lr 1.0e-4
--lr_warmup_fraction 0.1
--log_interval 1
--min_lr 1e-7
--save $out_put
--save_interval 256
--max_length 8192
--num_workers 32
--no_save_optim true
--no_save_rng true
--dataset_num_proc 32
--attention_backend flash
--load_from_cache_file true
--enable_channel_loss true
另外,在之前版本的时候只设置expert_model_parallel_size=16,其它都是1时,成功训练,但是显存接近打满,更新3.9版本及之后,开始OOM,然后最近又拉最新代码,还是OOM,于是尝试其它并行配置,设置tensor_model_parallel_size时,遇到卡死问题(15个小时都在卡)
最新尝试使用如上的PP=4,emp=4,遇到如下问题:
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 from the megatron sft entry point and reproduce the reported configuration on the PAI DLC platform with two machines and 16 810 PPU cards. Compare the successful expert-model-parallel-only setup with the PP=4 and EMP=4 command, then inspect the attached error and the reported OOM or 15-hour hang. Done means identifying the incompatible setting or regression and confirming a working configuration without OOM or deadlock.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100