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 offload when weights are on the GPU #945

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Fix offload when weights are on the GPU #945

merged 1 commit into from
Dec 28, 2022

Conversation

sgugger
Copy link
Collaborator

@sgugger sgugger commented Dec 27, 2022

This was reported in #938 and is a very small and easy fix: some checkpoints may have weights on the GPU and if the user does not pass along map_location="cpu" (which also our load_checkpoint function does not) we end with an error at this line.

@sgugger sgugger requested a review from pacman100 December 27, 2022 07:55
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 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 🤗

@sgugger sgugger merged commit 07e2e71 into main Dec 28, 2022
@sgugger sgugger deleted the offload_weight_gpu branch December 28, 2022 07:43
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.

3 participants