-
Notifications
You must be signed in to change notification settings - Fork 1k
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
AttributeErrorAttributeError: : 'DeepSpeedEngineWrapper' object has no attribute '_zero3_consolidated_fp16_state_dict' #369
Comments
please update your code to following after the PR #370 is merged. - unwrapped_model.save_pretrained(save_dir, save_function=accelerator.save, state_dict=accelerator.get_state_dict(model))
+ unwrapped_model.save_pretrained(save_dir, is_main_process=accelerator.is_main_process, save_function=accelerator.save, state_dict=accelerator.get_state_dict(model)) |
After the change has been merged. I'm getting a new error . Code i have used.
I got the following error saying 'Nonetype' object is not iterable.
Installed packages version:
I installed accelerate by cloning latest repo and "python setup.py install" @pacman100 Please inform if i make a mistake. |
Adding this line worked for me now. Inside accelerator.py, "get_state_dict" method.
|
Hello @KOVVURISATYANARAYANAREDDY , thank you for informing on the new error and also coming up with the resolution. I have checked your resolution by making the above change, using the saved model and making sure the same performance is being achieved. |
Thank you @pacman100 |
fixes huggingface#369 Co-Authored-By: Kovvuri Satyanarayana Reddy <54667784+KOVVURISATYANARAYANAREDDY@users.noreply.github.com>
* fix deepspeed model saving * fix deepspeed zero stage-3 model save fixes #369 Co-Authored-By: Kovvuri Satyanarayana Reddy <54667784+KOVVURISATYANARAYANAREDDY@users.noreply.github.com> Co-authored-by: Kovvuri Satyanarayana Reddy <54667784+KOVVURISATYANARAYANAREDDY@users.noreply.github.com>
Accelerator with Deepspeed stage 3 when saving the model giving following error
Code I used:
The above code is giving following error:
Can someone help?
The text was updated successfully, but these errors were encountered: