Skip to content

update typo in bnb quantisation 4bit flag docstring#3828

Merged
SunMarc merged 1 commit intohuggingface:mainfrom
hbraith:typo-bnb-quantization-config-docstring
Nov 4, 2025
Merged

update typo in bnb quantisation 4bit flag docstring#3828
SunMarc merged 1 commit intohuggingface:mainfrom
hbraith:typo-bnb-quantization-config-docstring

Conversation

@hbraith
Copy link
Contributor

@hbraith hbraith commented Nov 2, 2025

What does this PR do?

Current stable (v11.1.0) docs at https://huggingface.co/docs/accelerate/v1.11.0/en/package_reference/utilities#accelerate.utils.BnbQuantizationConfig reference the 4 bit quantisation flag as load_in_4_bit instead of load_in_4bit as in the class constructor, example code, and transformers.BitsAndBytesConfig.

Note that the source code expects and uses load_in_4bit in the actual constructor, and the only reference I found matching load_in_4_bit was in the docstring for BnBQuantizationConfig in src/accelerate/utils/dataclasses.py.

Very minor change, but hoping to save others a quick moment of of puzzle, initially was confused as to why the transformers.BitsAndBytesConfig would have subtly different named kwargs, but turned out to be a non issue, as the underlying kwargs I was relying on were actually the same.

I thought it would be easier to raise a PR than an issue, but let me know if this was inappropriate.

I haven't run the tests as changes were only in the docstring, but did verify parsing via python -m compileall src/accelerate/utils/dataclasses.py and also ran make style without issues.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

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.

Tagging from the suggested list,

Thanks, let me know if I have missed anything, appreciate the work you all do!

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.

Indeed thanks

@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 SunMarc merged commit 61bcdaa into huggingface:main Nov 4, 2025
25 checks passed
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.

3 participants