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

Fix kwargs passed by AutoQuantizationConfig.from_pretrained #33798

Conversation

kylesayrs
Copy link
Contributor

@kylesayrs kylesayrs commented Sep 29, 2024

What does this PR do?

Fixes wrongly passed kwargs in AutoQuantizationConfig.from_pretrained

from transformers.quantizers import AutoQuantizationConfig
q_config = AutoQuantizationConfig.from_pretrained("nm-testing/tinyllama-w4a16-compressed-hf-quantizer")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ksayers/kylesayrs_transformers/src/transformers/quantizers/auto.py", line 111, in from_pretrained
    quantization_config.update(kwargs)
TypeError: QuantizationConfigMixin.update() takes 1 positional argument but 2 were given

Who can review?

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

@kylesayrs kylesayrs changed the title fix kwargs Fix kwargs passed by AutoQuantizationConfig.from_pretrained Sep 29, 2024
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.

Thanks for the fix !

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

Copy link
Contributor

@mgoin mgoin left a comment

Choose a reason for hiding this comment

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

Thank you 🙏

@LysandreJik LysandreJik merged commit 614c79a into huggingface:main Oct 2, 2024
22 checks passed
@kylesayrs kylesayrs deleted the kylesayrs/fix_AutoQuantizationConfig_update_kwargs branch October 2, 2024 15:02
NielsRogge pushed a commit to NielsRogge/transformers that referenced this pull request Oct 21, 2024
…ace#33798)

fix kwargs

Co-authored-by: kylesayrs <kyle@neuralmagic.com>
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.

7 participants