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

Merged
merged 7 commits into from
Mar 5, 2025
Merged

Initial PARQ addition and testing #1738

merged 7 commits into from
Mar 5, 2025

Conversation

lisjin
Copy link
Contributor

@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.

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
Contributor 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
@andrewor14 andrewor14 marked this pull request as ready for review March 5, 2025 19:55
@lisjin
Copy link
Contributor Author

lisjin commented Mar 5, 2025

@andrewor14 As we discussed in a different thread, we'll plan to include the torchtune experiment results in a separate PR. The code should be ready now, outside of any new suggestions you have!

@andrewor14
Copy link
Contributor

Thanks. I think we can merge this since it's not touching anything outside prototype. As discussed offline, we'll merge the distributed benchmark results separately in the README. Merging!

@andrewor14 andrewor14 merged commit ffb4350 into pytorch:main Mar 5, 2025
16 of 17 checks passed
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