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

Add HQQ optimizer #235

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Add HQQ optimizer #235

merged 1 commit into from
Jul 10, 2024

Conversation

dacorvo
Copy link
Collaborator

@dacorvo dacorvo commented Jul 10, 2024

What does this PR do?

This adds an HqqOptimizer that implements the algorithm described in "Half-Quadratic Quantization of Large Machine Learning Models", by Hicham Badri and Appu Shaji (https://mobiusml.github.io/hqq_blog/).
This is an adaption of the original implementation at https://github.com/mobiusml/hqq.

This optimizer is included more as an illustration than a real solution to address performance drop when quantizing models to qint4 or qint2, as it often produces models that achieve a worse performance than the ones produced by the vanilla MaxOptimizer (this confirms some numbers reported by several research papers).

@dacorvo dacorvo changed the title Aadd HQQ optimizer Add HQQ optimizer Jul 10, 2024
@dacorvo dacorvo merged commit 9dc93ce into main Jul 10, 2024
12 checks passed
@dacorvo dacorvo deleted the hqq_optimizer branch July 10, 2024 13:33
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.

1 participant