Skip to content
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

Initial PARQ addition and testing #1738

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Initial PARQ addition and testing #1738

wants to merge 6 commits into from

Conversation

lisjin
Copy link

@lisjin lisjin commented Feb 19, 2025

This PR imports PARQ code from an internal repo which will soon be released under https://github.com/facebookresearch. I exclude the image classification examples for now to minimize the code footprint.

PARQ is a QAT method based on a convex regularization framework that converges to hard quantization (i.e., STE) at its asymptotic limit. It splits quantization into: (1) estimating quantization values and (2) projecting full-precision weights onto the values. More details can be found in torchao/prototype/parq/README.md and we will add an arXiv link to the paper soon.

PARQ supports choices of:

Test plan: python test/prototype/test_parq.py

Copy link

pytorch-bot bot commented Feb 19, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit b18ffd7 with merge base 38e36de (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 Feb 19, 2025
@andrewor14 andrewor14 self-requested a review February 20, 2025 14:59
@andrewor14
Copy link
Contributor

Hi @lisjin, thanks for submitting this! If you have any high level results from your torchtune experiments so far, can you share them in the PR description as well? Also, are there any significant differences from the code in the PARQ repo or is it mostly just copy and paste?

@lisjin
Copy link
Author

lisjin commented Feb 20, 2025

Definitely! I'll add some preliminary torchtune results (and fix the failed tests) when I'm back early next week. The code was mostly copy and pasted from the PARQ repo.

@lisjin lisjin marked this pull request as draft February 24, 2025 22:38
@lisjin lisjin added the topic: new feature Use this tag if this PR adds a new feature label Feb 24, 2025
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. topic: new feature Use this tag if this PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants