Skip to content

Conversation

@benjaminye
Copy link
Contributor

@benjaminye benjaminye commented Mar 20, 2024

What does this PR do?

Fixes #29736

  • Introduces a helpful warning when passing in unused keyword arguments when initializing BitsAndBytesConfig
  • Checks if load_in_4bit and load_in_4bit is indeed a boolean value in order to prevent arbitrary types to be passed in
  • Checks for type safety again when setters for load_in_4bit and load_in_8bit are invoked

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Copy link
Contributor

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

Additions look good to me - thanks for adding!

Let's just have a final confirmation from @younesbelkada that it's OK

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.

Looking great thanks !

typo correction for load_in_8bit setter checks

Co-authored-by: Younes Belkada <[email protected]>
@benjaminye
Copy link
Contributor Author

@amyeroberts @younesbelkada
Thanks everyone! 😃

@amyeroberts amyeroberts merged commit 8dd4ce6 into huggingface:main Mar 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.

BitsAndBytesConfig Accepting Arbitrary Parameters without Throwing Error

3 participants