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

Add optimum.quanto as supported load-time quantization_config #10328

Open
vladmandic opened this issue Dec 20, 2024 · 2 comments
Open

Add optimum.quanto as supported load-time quantization_config #10328

vladmandic opened this issue Dec 20, 2024 · 2 comments
Assignees

Comments

@vladmandic
Copy link
Contributor

Recent additions to diffusers added BitsAndBytesConfig as well as TorchAoConfig options that can be used as quantization_config when loading model components using from_pretrained

for example:

quantization_config = BitsAndBytesConfig(...)
transformer = SD3Transformer2DModel.from_pretrained(repo_id, subfolder="transformer", quantization_config=quantization_config)

ask is to also support Huggingface's own Optimum Quanto
right now its possible to use it, but only as post-load on-demand quantization, there is no option to use it like BnB or TorchAO to apply quantization automatically during load itself.

@yiyixuxu @sayakpaul @DN6 @asomoza

@sayakpaul
Copy link
Member

This should be relatively easy to add. @DN6 @a-r-r-o-w any of you would like to take it up? Since we have three new backends and a guide to add a new backend for quantization, I think this could be opened for community contributions, too.

@a-r-r-o-w
Copy link
Member

I have a few things on my plate on the optimization and performance side that I would like to get out first in the next 1-2 weeks. Will be happy to look into it if not picked up by then 🔜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants