Skip to content

[Quantizers] add is_compileable property to quantizers. #11736

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 3 commits into from
Jun 19, 2025

Conversation

sayakpaul
Copy link
Member

What does this PR do?

Like transformers.

We have tests for all of these quantizers with torch.compile(). So, we should be good.

@sayakpaul sayakpaul requested review from DN6 and SunMarc June 18, 2025 02:07
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

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

Nice ! Thanks for adding this

Comment on lines +567 to +570
@property
def is_compileable(self) -> bool:
return True

Copy link
Member

Choose a reason for hiding this comment

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

add check for bnb version

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, not sure about version-guarding since compilation was supported even before the latest release. It's the "no graph-breaks" that is the catch.

@sayakpaul sayakpaul merged commit 48eae6f into main Jun 19, 2025
16 checks passed
@sayakpaul sayakpaul deleted the is-compileable-prop-quant branch June 19, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants