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

Fix extraction of state dict in offload #795

Merged
merged 1 commit into from
Oct 31, 2022
Merged

Fix extraction of state dict in offload #795

merged 1 commit into from
Oct 31, 2022

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Oct 27, 2022

When we end up with weights offloaded on CPU and disk, there is a little bug in the function that extracts the CPU state dict. In the added tests, it would catch the submodules beginning like the one passed (so a.10 because a.1 is in the list).

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 27, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! LGTM 🤗

Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and test!

@sgugger sgugger merged commit 8c92805 into main Oct 31, 2022
@sgugger sgugger deleted the fix_offload_sd branch October 31, 2022 16:29
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

Successfully merging this pull request may close these issues.

4 participants