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

chatglm4v-9b全量微调full报错:File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 149, in __init__ [rank0]: self.dtype = self.optimizer.param_groups[0]['params'][0].dtype [rank0]: IndexError: list index out of range #2043

Closed
Sunxiaohu0406 opened this issue Sep 14, 2024 · 1 comment

Comments

@Sunxiaohu0406
Copy link

[rank0]: Traceback (most recent call last):
[rank0]: File "/home/nfs/appnfs/sxh/code/swift-latest/examples/pytorch/llm/llm_sft.py", line 6, in
[rank0]: output = sft_main()
[rank0]: File "/home/nfs/appnfs/sxh/code/swift-latest/swift/utils/run_utils.py", line 32, in x_main
[rank0]: result = llm_x(args, **kwargs)
[rank0]: File "/home/nfs/appnfs/sxh/code/swift-latest/swift/llm/sft.py", line 439, in llm_sft
[rank0]: trainer.train(training_args.resume_from_checkpoint)
[rank0]: File "/home/nfs/appnfs/sxh/code/swift-latest/swift/trainers/mixin.py", line 409, in train
[rank0]: res = super().train(resume_from_checkpoint, *args, **kwargs)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/transformers/trainer.py", line 1948, in train
[rank0]: return inner_training_loop(
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/transformers/trainer.py", line 2105, in _inner_training_loop
[rank0]: model, self.optimizer = self.accelerator.prepare(self.model, self.optimizer)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/accelerate/accelerator.py", line 1318, in prepare
[rank0]: result = self._prepare_deepspeed(*args)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/accelerate/accelerator.py", line 1815, in _prepare_deepspeed
[rank0]: engine, optimizer, _, lr_scheduler = deepspeed.initialize(**kwargs)
[rank0]: File "/home/nfs/appnfs/sxh/code/swift-latest/swift/llm/utils/template.py", line 344, in _initialize
[rank0]: res = _old_initialize(*args, **kwargs)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/init.py", line 176, in initialize
[rank0]: engine = DeepSpeedEngine(args=args,
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 307, in init
[rank0]: self._configure_optimizer(optimizer, model_parameters)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 1257, in _configure_optimizer
[rank0]: self.optimizer = self._configure_zero_optimizer(basic_optimizer)
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 1579, in _configure_zero_optimizer
[rank0]: optimizer = DeepSpeedZeroOptimizer_Stage3(
[rank0]: File "/usr/local/Python3.10.0/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 149, in init
[rank0]: self.dtype = self.optimizer.param_groups[0]['params'][0].dtype
[rank0]: IndexError: list index out of range

@Sunxiaohu0406
Copy link
Author

已经解决,需要使用官方配置的deepspeed文件

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