ml-explore / mlx-examples

Examples in the MLX framework
MIT License
6.27k stars 896 forks source link

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

Open s-smits opened 7 months ago

s-smits commented 7 months ago

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: https://github.com/AnswerDotAI/fsdp_qlora/pull/51

Caveats (from HF implementation):

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

cmhungsteve commented 7 months ago

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

zaithottakath commented 4 months ago

https://github.com/ml-explore/mlx-examples/pull/891