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

[Feature Request] Support for QDoRA: Efficient quantized fine-tuning #714

Open
s-smits opened this issue Apr 23, 2024 · 1 comment
Open

Comments

@s-smits
Copy link

s-smits commented Apr 23, 2024

Today we’re releasing the next step: QDoRA. This is just as memory efficient and scalable as FSDP/QLoRA, and critically is also as accurate for continued pre-training as full weight training. We think that this is likely to be the best way for most people to train1 language models. We’ve ran preliminary experiments on Llama 2, and completed some initial ones on Llama 3. The results are extremely promising.

https://www.answer.ai/posts/2024-04-26-fsdp-qdora-llama3.html

image

image

Impelementation Answer.AI:
AnswerDotAI/fsdp_qlora#51

Caveats (from HF implementation):

  • Only linear and DoRA only supports linear and Conv2d layers at the momement.
  • DoRA introduces a bigger overhead than pure LoRA, so it is recommended to merge weights for inference.
  • DoRA should work with weights quantized with bitsandbytes (“QDoRA”). However, issues have been reported when using QDoRA with DeepSpeed Zero2.

Would be great to use this method to optimize cost-efficient and assumably even better fine-tuning!

@s-smits s-smits changed the title [Feature Request] Support for QDoRA: Efficient quantized fine-tuning close to fp16 [Feature Request] Support for QDoRA: Efficient quantized fine-tuning Apr 23, 2024
@cmhungsteve
Copy link

Official PyTorch implementation of DoRA: https://github.com/NVlabs/DoRA

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

No branches or pull requests

2 participants