Skip to content

Add __init__.py for group wise lut quantization package #2702

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

Merged
merged 1 commit into from
Aug 11, 2025

Conversation

szyszyzys
Copy link
Contributor

Reviewed By: metascroy

Differential Revision: D79119958

Copy link

pytorch-bot bot commented Aug 6, 2025

🔗 Helpful Links

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

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

✅ No Failures

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

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

@meta-cla meta-cla 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 Aug 6, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

@szyszyzys szyszyzys requested a review from metascroy August 6, 2025 21:16
@szyszyzys szyszyzys added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Aug 6, 2025
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@jerryzh168
Copy link
Contributor

still planning to merge this with coreml_codebook_quant tensor?

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@szyszyzys szyszyzys requested review from metascroy and removed request for metascroy August 11, 2025 16:49
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@metascroy
Copy link
Contributor

@szyszyzys your code needs to go through the ruff linter

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

@szyszyzys
Copy link
Contributor Author

@szyszyzys your code needs to go through the ruff linter

I initially used ruff format to check the formatting while ignoring import formatting. Now, I'm using ruff check --select I --fix to address the issue.

@szyszyzys
Copy link
Contributor Author

szyszyzys commented Aug 11, 2025

still planning to merge this with coreml_codebook_quant tensor?

Yes, I plan to merge it in a future commit. I'm currently considering how to seamlessly integrate the separate LUT and scale group sizes (or LUT and scale block sizes) into the coreml_codebook_quant tensor. I've now ensured that all the code uses a consistent definition of block size, which will make it easier to adapt the coreml_codebook_quant.

Changing the coreml_codebook_quant tensor to include LUT block size and scale block size should make the code functional. Although CoreML currently doesn't support generating scales, it would be straightforward to use the block size as the LUT block size. However, testing whether the scales improve performance could be challenging.
Additionally, using a single block size might not be very extensible, as there could be more advanced ways to handle grouping in the future. Do you have any ideas on how to approach this?

Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79119958

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 11, 2025
Summary: Pull Request resolved: pytorch#2702

Reviewed By: metascroy

Differential Revision: D79119958
@facebook-github-bot facebook-github-bot merged commit 510e1b4 into pytorch:main Aug 11, 2025
19 of 20 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. fb-exported topic: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants