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

Add Embedding Quantization to QAT module_swap flow #886

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TiRune
Copy link

@TiRune TiRune commented Sep 13, 2024

Summary: Adding the embedding quantizer in the same fashion as the other module swap setup.

Differential Revision: D62664322

Copy link

pytorch-bot bot commented Sep 13, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1430e0e with merge base a4221df (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 Sep 13, 2024
@facebook-github-bot
Copy link

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

@facebook-github-bot
Copy link

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

TiRune added a commit to TiRune/ao that referenced this pull request Sep 16, 2024
Summary:
Pull Request resolved: pytorch#886

Adding the embedding quantizer in the same fashion as the other module swap setup.

Differential Revision: D62664322
@facebook-github-bot
Copy link

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

TiRune added a commit to TiRune/ao that referenced this pull request Sep 17, 2024
Summary:
Pull Request resolved: pytorch#886

Adding the embedding quantizer in the same fashion as the other module swap setup.

Differential Revision: D62664322
@@ -965,6 +965,41 @@ def forward(self, input: torch.Tensor) -> torch.Tensor:
self.precision,
)


def _replace_embedding_4w(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if this can be added at the user code side, since we are planning to deprecate the module swap API

Copy link
Author

@TiRune TiRune Sep 17, 2024

Choose a reason for hiding this comment

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

Please don't deprecate the module swap API - it's the easiest to work with and extend.
I'll likely have a headache if I wanted to make things work quickly and effectively with the tensor subclass stuff.

If you guys have a few minutes, we can discuss together how to add this to the tensor subclass stuff as well... but...

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I think keeping multiple implementations of the same thing might be confusing, we can gather all the requirements and decide on the long term plan I think, I'm asking Andrew to take a stab first

Summary:
Pull Request resolved: pytorch#886

Adding the embedding quantizer in the same fashion as the other module swap setup.

Differential Revision: D62664322
@facebook-github-bot
Copy link

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants