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

Convert QLoRA trained model to AWQ #155

Closed
vidhyat98 opened this issue Nov 4, 2023 · 4 comments · Fixed by #206
Closed

Convert QLoRA trained model to AWQ #155

vidhyat98 opened this issue Nov 4, 2023 · 4 comments · Fixed by #206

Comments

@vidhyat98
Copy link

Hi there!
I have an MPT model that was fine tuned with QLoRA. I merged the QLoRA weights to the original model and saved it in 16bit (because save_pretrained() of transformers doesn't allow to save 4bit versions yet).
I am trying to convert this 16bit model to AWQ. After loading the model, when I apply model.quantize(tokenizer, quant_config=quant_config), I get an error saying:
TypeError: forward() got an unexpected keyword argument 'output_attentions'

How do I solve this?
I am using "0.1.6" version of AutoAWQ and downgraded transformers to 4.34. Torch and other libraries are of the version mentioned in the setup.py file.

@casper-hansen
Copy link
Owner

I see now that there is an incompatibility. MPT models used to have seamless compatibility, but they pushed updates to the model repositories that are not pushed into Huggingface transformers.

I will look into if there is a workaround for this.

@vidhyat98
Copy link
Author

Thanks, I'll be eagerly looking forward to your response! This AWQ conversion is a crucial step in my project :)

@casper-hansen
Copy link
Owner

If I were you, an easy thing to try is going many versions back to see if you can find one that works with transformers+AutoAWQ.

@vidhyat98
Copy link
Author

Hi! I tried with various versions of transformers from 4.30 to 4.36 against different autoawq versions (upto 0.1.7). Still getting the error..
This is mosaicml/mpt-30b-instruct being used as the base model.

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 a pull request may close this issue.

2 participants