[DRAFT] Feat (axe): improved implementation with extended support/testing #1181
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.
Reason for this PR
The initial implementation of accumulator-aware extensions (AXE) for post-training quantization only supports asymmetric activation quantization with per-row scaling factors at the finest granularity, although the algorithm is general enough to support symmetric quantization with fine-grained scaling factors (i.e., per-group). This PR extends support to include both symmetric activation quantization and groupwise scaling factors, which enables AXE for MX datatypes.
The implementation follows the paper "Accumulator-Aware Post-Training Quantization" (see https://arxiv.org/abs/2409.17092)
Changes Made in this PR
An AXE mixin is created (i.e.,
AXE
), which is compatible with bothA2GPTQ
andA2GPFQ
. The mixin handles both the soft constraint that derives the optimal Lagrange multiplier and the hard constraint which handles the greedy recursive L1 bound.The APIs for the TorchVision and Huggingface models remain unchanged; the backend has been simplified.
Blocked by #1172
Testing Summary
With the accumulator-aware GPxQ variants moved into the core library, the GPxQ unit tests have been extended.
Risk Highlight
Checklist
dev
branch.