-
Notifications
You must be signed in to change notification settings - Fork 55
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
Use QDoRA instead of just LoRA #128
base: main
Are you sure you want to change the base?
Conversation
from peft import ( | ||
LoraConfig, | ||
LoraRuntimeConfig, | ||
get_peft_model, | ||
prepare_model_for_kbit_training, | ||
) |
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 changed this
use_dora=True, | ||
runtime_config=LoraRuntimeConfig(ephemeral_gpu_offload=True), |
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 added these two lines
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.
Nice one 👍🏼
Uses QDoRA instead of just LoRA. This has some efficiency benefits, notably faster training without a corresponding performance loss. See this for more details.
The code on the base branch was also unformatted, but (aside from formatting changes) I've highlighted the specific lines where I've actually changed code.