modelscope / ms-swift

Use PEFT or Full-parameter to finetune 350+ LLMs or 100+ MLLMs. (LLM: Qwen2.5, Llama3.2, GLM4, Internlm2.5, Yi1.5, Mistral, Baichuan2, DeepSeek, Gemma2, ...; MLLM: Qwen2-VL, Qwen2-Audio, Llama3.2-Vision, Llava, InternVL2, MiniCPM-V-2.6, GLM4v, Xcomposer2.5, Yi-VL, DeepSeek-VL, Phi3.5-Vision, ...)
https://swift.readthedocs.io/zh-cn/latest/Instruction/index.html
Apache License 2.0
3.99k stars 354 forks source link

NotImplementedError: data_seed requires Accelerate version `accelerate` >= 1.1.0. This is not supported and we recommend you to update your version. #2339

Open jiabao-wang opened 2 hours ago

jiabao-wang commented 2 hours ago

Describe the bug when run: CUDA_VISIBLE_DEVICES=0 swift sft \ --model_type deepseek-vl-7b-chat \ --dataset coco-en-mini \

output: NotImplementedError: data_seed requires Accelerate version accelerate >= 1.1.0. This is not supported and we recommend you to update your version.(描述bug以及复现过程,最好有截图)

But the funny thing is that the highest version of Accelerate is 1.0.1

so what should i do?

detail output: run sh: /home/wjb/anaconda3/envs/sd/bin/python /home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/cli/sft.py --model_type deepseek-vl-1_3b-chat --dataset coco-en-mini [INFO:swift] Successfully registered /home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/llm/data/dataset_info.json [INFO:swift] No vLLM installed, if you are using vLLM, you will get ImportError: cannot import name 'get_vllm_engine' from 'swift.llm' [INFO:swift] No LMDeploy installed, if you are using LMDeploy, you will get ImportError: cannot import name 'prepare_lmdeploy_engine_template' from 'swift.llm' [INFO:swift] Start time of running main: 2024-10-25 15:16:55.796605 [INFO:swift] Setting template_type: deepseek-vl [INFO:swift] Setting args.lazy_tokenize: True [INFO:swift] Setting args.dataloader_num_workers: 1 Traceback (most recent call last): File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/cli/sft.py", line 5, in sft_main() File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/utils/run_utils.py", line 22, in x_main args, remaining_argv = parse_args(args_class, argv) File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/utils/utils.py", line 131, in parse_args args, remaining_args = parser.parse_args_into_dataclasses(argv, return_remaining_strings=True) File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/transformers/hf_argparser.py", line 352, in parse_args_into_dataclasses obj = dtype(**inputs) File "", line 215, in init File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/llm/utils/argument.py", line 1151, in post_init__ self._init_training_args() File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/llm/utils/argument.py", line 1203, in _init_training_args training_args = training_args_cls( File "", line 144, in init File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/swift/trainers/arguments.py", line 39, in post_init super().post_init() File "/home/wjb/anaconda3/envs/sd/lib/python3.9/site-packages/transformers/training_args.py", line 2083, in __post_init raise NotImplementedError( NotImplementedError: data_seed requires Accelerate version accelerate >= 1.1.0. This is not supported and we recommend you to update your version.

thonglv21 commented 2 hours ago

Same issue

jiabao-wang commented 1 hour ago

@Jintao-Huang help! thank you very much.

thonglv21 commented 13 minutes ago

try transformers==4.40.0

Same issue