Skip to content

[quant] allow components_to_quantize to be a non-list for single components - #12234

Merged
yiyixuxu merged 10 commits into
mainfrom
allow-non-list-component
Sep 10, 2025
Merged

[quant] allow components_to_quantize to be a non-list for single components#12234
yiyixuxu merged 10 commits into
mainfrom
allow-non-list-component

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

What does this PR do?

Just a small QoL improvement for pipeline-level quantization.

PipelineQuantizationConfig(
quant_backend="bitsandbytes_4bit",
quant_kwargs={"load_in_4bit": True, "bnb_4bit_quant_type": "nf4", "bnb_4bit_compute_dtype": torch.bfloat16},
components_to_quantize="transformer", # instead of ["transformer"]
)

@SunMarcSunMarc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks !

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

Comment threaddocs/source/en/quantization/overview.md Outdated
@stevhliu

Copy link
Copy Markdown
Member

Will update the docs with this change once merged! 🫡

@stevhliustevhliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Probably better to put it higher up :)

Comment threaddocs/source/en/quantization/overview.md
Comment threaddocs/source/en/quantization/overview.md Outdated
sayakpauland others added 4 commits September 5, 2025 06:45
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
init
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>

@yiyixuxuyiyixuxu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!

@yiyixuxu
yiyixuxu merged commit eb7ef26 into mainSep 10, 2025
14 checks passed
@yiyixuxu
yiyixuxu deleted the allow-non-list-component branch September 10, 2025 19:47
Sign up for freeto 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.

5 participants

@sayakpaul@HuggingFaceDocBuilderDev@stevhliu@yiyixuxu@SunMarc