Skip to content

Add api for group wise low bit quantization, using codebook utils provided by coreml #2679

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 9, 2025

Conversation

szyszyzys
Copy link
Contributor

Reviewed By: metascroy

Differential Revision: D79119940

Copy link

pytorch-bot bot commented Aug 4, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit a54a372 with merge base 6cfa477 (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 4, 2025
@facebook-github-bot
Copy link
Contributor

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

@szyszyzys szyszyzys requested a review from metascroy August 4, 2025 20:55
@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 4, 2025
@metascroy
Copy link
Contributor

Requires linting with ruff

@szyszyzys szyszyzys requested review from metascroy and removed request for metascroy August 6, 2025 17:30
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
@szyszyzys szyszyzys requested review from metascroy and removed request for metascroy August 6, 2025 21:14
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 6, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940


@torch.no_grad
def _quantize_row_wise_with_coreml_no_scales(
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will change this function to be align with the latest version of the coreml implementation.



@torch.no_grad
def _dequantize_row_wise_with_coreml_no_scales(
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will change this function to be align with the latest version of the coreml implementation.

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 7, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Differential Revision: D79119940

Reviewed By: metascroy
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

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

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

szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Differential Revision: D79119940

Reviewed By: metascroy
szyszyzys added a commit to szyszyzys/ao that referenced this pull request Aug 8, 2025
…vided by coreml (pytorch#2679)

Summary: Pull Request resolved: pytorch#2679

Reviewed By: metascroy

Differential Revision: D79119940
@facebook-github-bot facebook-github-bot merged commit 4fc4068 into pytorch:main Aug 9, 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.

3 participants