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

Improve error msg when using bitsandbytes #31350

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

SunMarc
Copy link
Member

@SunMarc SunMarc commented Jun 10, 2024

What does this PR do ?

This PR fixes a typo in an error message and make it easier to debug when getting an import error for bitsandbytes.

Fixes #30751

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks ! left two comments about potentially unneeded changes

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change intended?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change intended?

@SunMarc
Copy link
Member Author

SunMarc commented Jun 10, 2024

yes my bad i pushed the wrong branch. let me fix this !

@SunMarc SunMarc force-pushed the improve-import-bnb branch from da0562d to 0b39170 Compare June 10, 2024 11:47
@SunMarc SunMarc requested a review from younesbelkada June 10, 2024 11:47
Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Thanks a lot !

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks!

Is this only difference between the 4bit and 8bit validation the required version? If so, we could always abstract out a common set of things to validate and the just have quantizer_bnb_4bit.validate_environment use that + the version check

@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.

@SunMarc
Copy link
Member Author

SunMarc commented Jun 10, 2024

Makes sense ! I think that this was the goal of required_packages attribute in HfQuantizer but we never used it in the end. I will do that in a follow up PR for all quants methods.

@SunMarc SunMarc merged commit dc6eb44 into huggingface:main Jun 10, 2024
21 checks passed
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Jun 14, 2024
itazap pushed a commit that referenced this pull request Jun 17, 2024
itazap pushed a commit that referenced this pull request Jun 17, 2024
itazap pushed a commit that referenced this pull request Jun 17, 2024
itazap pushed a commit that referenced this pull request Jun 18, 2024
itazap pushed a commit that referenced this pull request Jun 20, 2024
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.

BitsNBytes 4 bit quantization error message typo and logical errors in error message handling
4 participants