Skip to content

Initial PARQ addition and testing#1738

Merged
andrewor14 merged 7 commits into
pytorch:mainfrom
lisjin:parq
Mar 5, 2025
Merged

Initial PARQ addition and testing#1738
andrewor14 merged 7 commits into
pytorch:mainfrom
lisjin:parq

Conversation

@lisjin

@lisjin lisjin commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

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

@pytorch-bot

pytorch-bot Bot commented Feb 19, 2025

Copy link
Copy Markdown

🔗 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
Copy Markdown
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

lisjin commented Feb 20, 2025

Copy link
Copy Markdown
Contributor Author

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

lisjin commented Mar 5, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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
@lisjin lisjin deleted the parq branch April 4, 2025 15:44
liangel-02 pushed a commit that referenced this pull request Aug 25, 2025
* Initial PARQ addition and testing

* Fix errors due to torch version differences

* Revert torchao/float8/config.py

* Fix custom decorator

* Reformat parq.py

* Undo third_party/cutlass change
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