DeepSeekV4 Full-para train: Resource temporarily unavailable。
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- machine-learning
Direzione di ricerca
The report provides a Megatron SFT launch script and says each rank starts many pthreads until LLVM reports pthread_create failed. Start by reproducing with the supplied environment variables and parallelism settings, then inspect the training startup and thread creation paths involved. Done means identifying why threads multiply across ranks and confirming training can start without the resource error; the payload names no source files or tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
进行deepseek v4的训练时发现,每个rank都会启动特别多的pthread,最后会导致LLVM ERROR: pthread_create failed: Resource temporarily unavailable。
How to Reproduce / 如何复现
训练的脚本:
if [ -z "$NODE_RANK" ]; then
echo "ERROR: NODE_RANK is not set"
exit 1
fi
CACHE=/mnt/storage/zhq/dsv4/cache/rank_${NODE_RANK}
mkdir -p "$CACHE"/{modelscope,hf,tmp}
OMP_NUM_THREADS=1
MKL_NUM_THREADS=1
OPENBLAS_NUM_THREADS=1
NUMEXPR_NUM_THREADS=1
TOKENIZERS_PARALLELISM=false
MAX_JOBS=1
TORCHINDUCTOR_COMPILE_THREADS=1
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True'
NPROC_PER_NODE=8
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
MODELSCOPE_CACHE="$CACHE/modelscope"
HF_HOME="$CACHE/hf"
HF_DATASETS_CACHE="$CACHE/hf/datasets"
TMPDIR="$CACHE/tmp"
megatron sft
--model /mnt/storage/models/deepseek-ai/DeepSeek-V4-Flash-Base
--save_safetensors true
--dataset /mnt/storage/zhq/dsv4/scripts/merged.jsonl
--model_author swift
--model_name swift-robot
--load_from_cache_file true
--add_non_thinking_prefix true
--split_dataset_ratio 0.001
--tensor_model_parallel_size 1
--expert_model_parallel_size 8
--pipeline_model_parallel_size 12
--pipeline_model_parallel_layout 'Et3|t3|t4|t4|t4|t4|t4|t4|t4|t4|t4|t1mL'
--fp8_recipe blockwise
--fp8_format e4m3
--fp8_param_gather true
--micro_batch_size 1
--global_batch_size 128
--recompute_granularity full
--recompute_method uniform
--recompute_num_layers 1
--save_total_limit 3
--moe_permute_fusion true
--moe_grouped_gemm true
--moe_shared_expert_overlap true
--moe_aux_loss_coeff 1e-3
--num_train_epochs 1
--finetune true
--cross_entropy_loss_fusion true
--lr 3e-5
--lr_warmup_fraction 0.05
--min_lr 1e-7
--output_dir /mnt/storage/zhq/dsv4/model/megatron_output/DeepSeek-V4-Flash/0924
--eval_steps 3000
--save_steps 1000
--max_length 16384
--dataloader_num_workers 2
--dataset_num_proc 8
--no_save_optim false
--no_save_rng false
--sequence_parallel true
--mtp_num_layers 1
--attention_backend flash
--use_chat_template false
--context_parallel_size 8
--cp_partition_mode contiguous
--sequence_packing_scheduler dp_balanced
--loss_scale all
--packing true
Additional Information / 补充信息
- Lingua principale
- Python
- Stelle
- 16.2k
- Fork
- 1.8k
- Merge medio
- 1g 14h
- PR unite (30g)
- 68
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelscope/ms-swift
-
get_multimodal_target_regex(..., exclude_router=True) does not exclude shared_expert_gateForse già presa @KonnyakuMatcha l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelscope/ms-swift#10696 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] GRPO REAL loss crashes with beta>0 and kl_in_reward=True (NoneType * Tensor)Forse già presa @newcloud123 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
modelscope/ms-swift#10690 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] GRPO REAL loss divides by all groups instead of valid groups, silently scaling gradientsForse già presa @newcloud123 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelscope/ms-swift#10688 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
modelscope/ms-swift#10621 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] `get_seed` consumes a draw from the shared RandomState even when decision augmentation is disabled, changing the train/val split and dataset shuffleForse già presa @ryznren l’ha presa 38 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelscope/ms-swift#10466 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelscope/ms-swift
Issue simili
-
Test: to_hijri() accepts datetime.datetime and uses only the date partForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertagood first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresForse già presa @AshutoshSingh840 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
UKGovernmentBEIS/control-arena#992 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
mvalentsev/awesome-free-ai-coding#70 ·
I maintainer di solito rispondono entro 1 giorno