Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swift2.6 版本 使用sequence_parallel_size训练导致acc 为nan #2870

Open
tanshoudong opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@tanshoudong
Copy link

训练脚本如下:
NPROC_PER_NODE=8
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
swift sft
--model_type qwen2_5-14b-instruct
--dataset new_data/rankrag_train.json
--num_train_epochs 3
--sft_type lora
--output_dir output/qwen2_5-14b-instruct
--max_length 128000
--batch_size 1
--logging_steps 10
--dataset_test_ratio 0.0
--gradient_accumulation_steps 1
--save_steps 100
--save_total_limit 3
--model_id_or_path /mnt/data/tsd/tengxun_cloud/tsd/llm_models/Qwen2.5-14B-Instruct
--add_output_dir_suffix False
--lora_target_modules ALL
--lora_rank 16
--sequence_parallel_size 4

8卡训练,sequence_parallel_size 设置为4或者8,都能训练,但是训练都异常,具体表现为acc为nan,sequence_parallel_size 设置为1,训练就很正常,由此可见我的训练的数据和脚本都没问题,那问题在哪里?
训练异常如下截图:
捕获

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant