Skip to content

deepspeed报错 #3991

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

Open
jfy1016 opened this issue Apr 25, 2025 · 2 comments
Open

deepspeed报错 #3991

jfy1016 opened this issue Apr 25, 2025 · 2 comments

Comments

@jfy1016
Copy link

jfy1016 commented Apr 25, 2025

CUDA_VISIBLE_DEVICES=0,1,2
MAX_PIXELS=1003520
swift sft
--model /home/jdn/.cache/modelscope/hub/models/deepseek-ai/deepseek-vl2-tiny
--dataset /home/jdn/deepseek/save_json/xunlian_CT_and_Xray.json
--train_type lora
--torch_dtype float16
--num_train_epochs 5
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--learning_rate 1e-4
--lora_rank 8
--lora_alpha 32
--target_modules all-linear
--freeze_vit true
--gradient_accumulation_steps 16
--lazy_tokenize true
--eval_steps 50
--save_steps 50
--save_total_limit 5
--logging_steps 5
--max_length 2048
--output_dir /home/jdn/deepseek/output
--warmup_ratio 0.05
--lazy_tokenize true
--dataloader_num_workers 2
--deepspeed zero3
报错Traceback (most recent call last):
File "/home/jdn/ms-swift/swift/cli/sft.py", line 11, in
sft_main()
File "/home/jdn/ms-swift/swift/llm/train/sft.py", line 283, in sft_main
return SwiftSft(args).main()
File "/home/jdn/ms-swift/swift/llm/train/sft.py", line 29, in init
super().init(args)
File "/home/jdn/ms-swift/swift/llm/base.py", line 18, in init
self.args = self._parse_args(args)
File "/home/jdn/ms-swift/swift/llm/base.py", line 30, in _parse_args
args, remaining_argv = parse_args(self.args_class, args)
File "/home/jdn/ms-swift/swift/utils/utils.py", line 148, in parse_args
args, remaining_args = parser.parse_args_into_dataclasses(argv, return_remaining_strings=True)
File "/home/jdn/anaconda3/envs/jdn/lib/python3.10/site-packages/transformers/hf_argparser.py", line 339, in parse_args_into_dataclasses
obj = dtype(**inputs)
File "", line 300, in init
File "/home/jdn/ms-swift/swift/llm/argument/train_args.py", line 160, in post_init
self._init_deepspeed()
File "/home/jdn/ms-swift/swift/llm/argument/train_args.py", line 178, in _init_deepspeed
raise ValueError('DeepSpeed is not compatible with device_map. '
ValueError: DeepSpeed is not compatible with device_map. n_gpu: 3, local_world_size: 1.如何修改

@jfy1016
Copy link
Author

jfy1016 commented Apr 25, 2025

@Jintao-Huang

@Jintao-Huang
Copy link
Collaborator

NPROC_PER_NODE=3 \

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

2 participants