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

Use QDoRA instead of just LoRA #128

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Use QDoRA instead of just LoRA #128

wants to merge 2 commits into from

Conversation

strickvl
Copy link
Contributor

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.

@strickvl strickvl added enhancement New feature or request internal labels Aug 22, 2024
Copy link

dagshub bot commented Aug 22, 2024

@strickvl strickvl changed the title Ese QDoRA instead of just LoRA Use QDoRA instead of just LoRA Aug 22, 2024
Comment on lines +23 to +28
from peft import (
LoraConfig,
LoraRuntimeConfig,
get_peft_model,
prepare_model_for_kbit_training,
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this

Comment on lines +101 to +102
use_dora=True,
runtime_config=LoraRuntimeConfig(ephemeral_gpu_offload=True),
Copy link
Contributor Author

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

Copy link
Contributor

@avishniakov avishniakov left a comment

Choose a reason for hiding this comment

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

Nice one 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants