Skip to content

Conversation

andrewor14
Copy link
Contributor

Summary: Refactor QAT into its own module so future QAT features can live under the same folder without making qat.py longer, and a separate QAT README can be added in the future.

Test Plan:
python test/quantization/test_qat.py

Copy link

pytorch-bot bot commented Jul 30, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/555

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit cf7f651 with merge base ec317fc (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 30, 2024
@unittest.skipIf(TORCH_VERSION_AFTER_2_5, "int4 doesn't work for 2.5+ right now")
def test_qat_4w_quantizer(self):
from torchao.quantization.prototype.qat import Int4WeightOnlyQATQuantizer
from torchao.quantization.prototype.qat.api import Int4WeightOnlyQATQuantizer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renaming seems worse and I don't believe you need it since Int4WeightOnlyQATQuantizer is part of qat/__init__.py

Summary: Refactor QAT into its own module so future QAT features
can live under the same folder without making qat.py longer,
and a separate QAT README can be added in the future.

Test Plan:
python test/quantization/test_qat.py
@andrewor14 andrewor14 merged commit 796fce3 into main Jul 30, 2024
@andrewor14 andrewor14 deleted the qat-refactor branch July 30, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants