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 serialization issues #258

Merged
merged 3 commits into from
Jul 25, 2024
Merged

Fix serialization issues #258

merged 3 commits into from
Jul 25, 2024

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Jul 25, 2024

What does this PR do?

This fixes two issues that were raised by @sayakpaul in #255.

Known issue: the new requantize method shows increased device memory on the MPS device on the unit test for an fp16 model. This will be addressed in a separate pull-request.

Instead of moving all model tensors to the meta device when
requantizing, let the caller decide which tensors should be
emptied.
This allows some tensors that are not serialized in the model state dict
but instead created on model initialization to be preserved.
@sayakpaul
Copy link
Member

Thank you!

@dacorvo dacorvo merged commit 1fb0aac into main Jul 25, 2024
14 checks passed
@dacorvo dacorvo deleted the fix_serialization_issues branch July 25, 2024 11:53
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.

2 participants