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

Any plans for QLora? #1537

Closed
asmith26 opened this issue Mar 31, 2024 · 5 comments
Closed

Any plans for QLora? #1537

asmith26 opened this issue Mar 31, 2024 · 5 comments
Assignees
Labels
Gemma Gemma model specific issues type:feature New feature or request

Comments

@asmith26
Copy link
Contributor

asmith26 commented Mar 31, 2024

Hi there! keras-nlp supports Lora, e.g. from https://ai.google.dev/gemma/docs/lora_tuning

...
gemma_lm.backbone.enable_lora(rank=4)
...

Just wondering are there any plans to implement QLora finetuning, to help make finetuning even more accessible on smaller GPUs?
https://arxiv.org/abs/2305.14314
https://huggingface.co/blog/4bit-transformers-bitsandbytes

Many thanks for any help, and this lib!

@mattdangerw
Copy link
Member

Yes actually! We are currently working or rolling out some support for quantization generally and quantize lora.

We will work on some actual docs for this soon, but for now you can check out the qlora.py in the description of this PR to see what we are working on -> keras-team/keras#19356

I believe the 4 bit normal float from the qlora paper is not currently available, but int8 quantized weights layered in with lora should be good to go.

Early days on the feature, so any feedback appreciated as we build it out.

Copy link

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@mattdangerw
Copy link
Member

Guide on this incoming...

keras-team/keras-io#1889

@Gopi-Uppari
Copy link

Hi @asmith26,

Could you please confirm if this issue is resolved for you with the above comment ? Please feel free to close the issue if it is resolved ?

Thank you.

@asmith26
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gemma Gemma model specific issues type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants