-
Notifications
You must be signed in to change notification settings - Fork 998
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: Resolve #3060, preload_module_classes
is lost for nested modules
#3248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Thanks for fixing ! Could you share which specific issue you where having ? Also if you can implement a test, it would be nice but not needed to merged this PR. You can fix the CI with make style
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed with Marc, some more details to this issue and adding a test is needed.
preload_module_classes
is lost for nested modules
Hi @muellerzr and @SunMarc Thanks for your review. I have briefly described the issue in overview of this PR. |
@wejoncy can you do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, and fantastic test. Let's just fixup that quality then good to merge!
What does this PR do?
We ran into this issue when try to load VPTQ models by multiple devices, the
VQLinear
layer has embending as its sub-module. This function should move all constant buffers/parameters to the corresponding devices from Meta device.So
add_hook_to_module
should passpreload_module_classes
to the next recursive calling for the nested modules.https://github.com/microsoft/VPTQ/blob/ac7258f461e214ca705f5895513f314576750528/vptq/layers/vqlinear.py#L160C18-L160C18
This PR is to fix #3060