-
Notifications
You must be signed in to change notification settings - Fork 31.3k
Fix hqq skipped modules and dynamic quant #36821
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
Conversation
|
Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. When it is ready for review, please click the |
SunMarc
left a comment
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.
Thanks ! Can you add a test to make sure that skip_modules works ?
Thank you @SunMarc! Sure, added |
* Fix hqq skip_modules and dynamic_quant * fix skipped modules loading * add dynamic/skip HqqConfig test
What does this PR do?
This PR tries to fix a couple of issues with hqq that popped up lately:
skip_modules: skip modules was not working properly. For example, if you specify the vision tower to skip during the quantization step, it was ignored. Now it works.dynamic_config=Truehas been broken lately after some changes in transformers. This is now fixed.You can now skip hqq quantization for the vision tower in VLMs as follows:
Currently, I am using my custom solution which works well - it makes sure that a safetensors chunk contains all the attributes for a given module before saving. We should have a open a separate issue for this though.
Who can review?
@ArthurZucker @SunMarc