Support QAT int4 v1 path for BC#2888
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2888
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ✅ No FailuresAs of commit 80ccdbc with merge base 6f035e8 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
e17a0a7 to
084eaff
Compare
Contributor
|
I think this PR should also test the int4 workflow with version 1, can we add that? |
084eaff to
8bb6aac
Compare
**Summary:** `Int4WeightOnlyConfig` supports version 1 (targeting tinygemm) and version 2 (targeting fbgemm). However, the latter requires a new dependency (fbgemm_gpu_genai >= 1.2.0), which is problematic for torchao integrations with other frameworks. For now, we should continue to support the v1 path for BC. **Test Plan:** ``` python test/quantization/test_qat.py -k test_infer_int4_weight_only_config ```
8bb6aac to
80ccdbc
Compare
Contributor
Author
added a test |
jerryzh168
reviewed
Aug 27, 2025
| """ | ||
| self._test_quantize_api_against_ptq( | ||
| Int4WeightOnlyConfig(version=version), | ||
| target_prepare_sqnr=12, |
Contributor
There was a problem hiding this comment.
does this mean the prepare numerics does not match convert numerics very well? will this be an issue
jerryzh168
approved these changes
Aug 27, 2025
vkuzo
pushed a commit
that referenced
this pull request
Aug 28, 2025
**Summary:** `Int4WeightOnlyConfig` supports version 1 (targeting tinygemm) and version 2 (targeting fbgemm). However, the latter requires a new dependency (fbgemm_gpu_genai >= 1.2.0), which is problematic for torchao integrations with other frameworks. For now, we should continue to support the v1 path for BC. **Test Plan:** ``` python test/quantization/test_qat.py -k test_infer_int4_weight_only_config ```
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.
Summary:
Int4WeightOnlyConfigsupports version 1 (targeting tinygemm) and version 2 (targeting fbgemm). However, the latter requires a new dependency (fbgemm_gpu_genai >= 1.2.0), which is problematic for torchao integrations with other frameworks. For now, we should continue to support the v1 path for BC.Test Plan: