-
Notifications
You must be signed in to change notification settings - Fork 344
Add int4 choosing qprams algorithm test for AWQ #3148
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3148
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit ad15bb9 with merge base 2fe0ca0 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Int4WeightOnlyConfig(group_size=128, int4_packing_format="tile_packed_to_4d"), | ||
Int4WeightOnlyConfig( | ||
group_size=128, | ||
int4_packing_format="tile_packed_to_4d", |
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.
nit: How about using packing_format
instead of int4_packing_format
, and choose_qparams_algorithm
instead of int4_choose_qparams_algorithm
? The current name seems too long and not generalized.
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.
this is intentional actually since we don't want to introduce global abstractions that is only used by a single dtype
torchao/quantization/quant_api.py
Outdated
if isinstance(self.int4_packing_format, str): | ||
self.int4_packing_format = Int4PackingFormat(self.int4_packing_format) | ||
if isinstance(self.int4_choose_qparams_algorithm, str): | ||
self.int4_choose_qparams_algorithm = Int4ChooseQParamsAlgorithm( | ||
self.int4_choose_qparams_algorithm | ||
) |
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.
these are not needed actually since we use str Enum
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.
can you remove this? I guess we can just add the config and it works.
wait, no fix is needed? does the test of int4 hqq config work? I remember it's failing for me |
Not sure for the true reason, but it failed and was overridden to |
And |
you mean the test_awq_functionality failed right? |
No, it worked. For
|
The reason why
|
for the script:
I get:
and it seems to be running locally, the test_awq_functionality works for the hqq algorithm as well |
Yeah it returns no fail for Hmm... I truly remember getting the following error:
But everything is resolved without any change...? Mamma mia 😕 |
yeah it runs for me locally without any changes. not sure why you get the error, seems like some env issues, are you using an H100 machine? fbgemm is only available in H100. |
Yes I use H100 for only allocated time (luckily now) and mostly use A100. Updated title and context for this change. |
Summary:
Add quantized parameter choosing algorithm for int4 weight-only quantization (
int4_choose_qparams_algorithm
) testRelated Issue/PR: #3106 (comment)
Test plan:
test/prototype/test_awq.py