Enable hqq_scale_only by default for XNNPACK#211
Merged
mergennachin merged 1 commit intomainfrom Feb 4, 2026
Merged
Conversation
Collaborator
Author
19c9881 to
e3131c1
Compare
Collaborator
Author
|
See previous result in pytorch/executorch#14834 |
metascroy
approved these changes
Feb 3, 2026
metascroy
approved these changes
Feb 3, 2026
| return Int8DynamicActivationIntxWeightConfig( | ||
| weight_dtype=torch.int4, | ||
| weight_granularity=granularity, | ||
| intx_choose_qparams_algorithm="hqq_scale_only", |
Contributor
There was a problem hiding this comment.
Also add this to other quant method? Like IntxWeightOnlyConfig?
larryliu0820
approved these changes
Feb 3, 2026
Add configurable qparams_algorithm parameter to quantize_model_() with "hqq_scale_only" as default. HQQ (Half-Quadratic Quantization) provides better accuracy by minimizing reconstruction error during quantization. Applied to IntxWeightOnlyConfig and Int8DynamicActivationIntxWeightConfig. Int4WeightOnlyConfig (4w with packing) keeps hardcoded "hqq" due to different API. UIntxWeightOnlyConfig (fpa4w) unchanged as it lacks this parameter. Users can override globally via: from optimum.exporters.executorch import quantization quantization.DEFAULT_QPARAMS_ALGORITHM = "affine"
e3131c1 to
fbe8427
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.