-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
FSDP - TypeError: load_state_dict() got an unexpected keyword argument 'strict' #18511
Comments
Hello @shrinath-suresh , this issue has to be fixed from PyTorch side. The issue raised with PyTorch has been linked above. |
Also, when using 🤗 Trainer FSDP integration doc is being updated to reflect the recent updates in this PR #18521. Please refer it for more details. |
Thanks for raising this issue! I responded in PT: pytorch/pytorch#82963. Although, not sure if HF uses nightlies/latest PT or a stable version. If we can't get pytorch updated in HF to include the fix, could we work around this by changing
to
|
@rohan-varma Thank you very much. I applied the fix as given in the screenshot and compiled from source. The model is gettting saved in the fsdp mode. Attached image and logs for the same |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
This should be fixed in PyTorch nightly now: pytorch/pytorch#83309 |
System Info
Who can help?
@sgugger
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Steps to reproduce the behaviour:
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install .
cd examples/pytorch/image-classification
Expected behavior
Model should get finetuned and saved successfully.
However, the following error is produced
Full example log -
fsdp_error.txt
Torch environment details:
the issue seems to be appearing after this commit .
The text was updated successfully, but these errors were encountered: