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

Error when load model in 4bit #1638

Open
rin2401 opened this issue Jul 31, 2024 · 1 comment
Open

Error when load model in 4bit #1638

rin2401 opened this issue Jul 31, 2024 · 1 comment

Comments

@rin2401
Copy link

rin2401 commented Jul 31, 2024

Don't need kwargs['load_in_4bit'] = True when use quantization_config

elif load_4bit:
kwargs['load_in_4bit'] = True
kwargs['quantization_config'] = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type='nf4'

@drzraf
Copy link

drzraf commented Sep 1, 2024

Happens with transformers 4.44.2 . The ValueError was introduced here in transformers (huggingface/transformers#21579) (instead of a slow deprecation)

This was merged in huggingface/transformers@3668ec1 (part of v4.27.0 and onward)

and since this project requires transformers==4.37.2, there is no reason to keep passing deprecated booleans which trigger this error.

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

No branches or pull requests

2 participants