-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
4-bit QLoRA via bitsandbytes (4-bit base model + LoRA) #476
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your inspiring work, as always! I just left 3 comments - also curious to see what @sgugger will say!
setup.py
Outdated
@@ -41,7 +41,6 @@ | |||
"packaging>=20.0", | |||
"psutil", | |||
"pyyaml", | |||
"torch>=1.13.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is not needed
@@ -18,7 +18,6 @@ | |||
import numpy as np | |||
import torch | |||
import transformers | |||
import wandb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this change is not needed either
if hasattr(self.base_model, "model"): | ||
self.base_model.model.generation_config = self.generation_config | ||
else: | ||
self.base_model.generation_config = self.generation_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes are fine for now, I will investigate later why this change is needed
The documentation is not available anymore as the PR was closed or merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the support to 4bit quantization! Apart from Younes comments on potentially unrelated changes, this looks great to me!
final changes
Thank you, Younes & Sylvain! Thanks for the changes, Younes. This looks all good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again thank you for your great work, Tim!
holy shit it's happening |
dettmers is a hero |
This adds QLoRA support to PEFT. More information about QLoRA from our abstract:
@sgugger @younesbelkada