CTranslate2 icon indicating copy to clipboard operation
CTranslate2 copied to clipboard

QLoRA support?

Open limcheekin opened this issue 3 years ago • 7 comments

Hi there,

Not sure where it is relevant here.

Is CTranslate2 going to support QLoRA? Please see the following paper for more information: https://arxiv.org/abs/2305.14314

Thanks.

limcheekin avatar May 28 '23 03:05 limcheekin

I had a good experience fine-tuning with QLoRA, but the inference speed makes it unusable in production. If CTranslate2 supported QLoRA, it'd solve a big problem!

tabacof avatar Jun 06 '23 09:06 tabacof

Really?! Appreciate if you can share more info on the inference speed of models fine tuned with QLoRA compare to LoRA.

Thanks.

limcheekin avatar Jun 06 '23 11:06 limcheekin

Out of interest, can't you just merge the adapter weights back into the base model and then use it with Ctranslate2?

Peft is supporting this, but haven't tried it yet.

aamir-s18 avatar Jun 06 '23 11:06 aamir-s18

@limcheekin I didn't compare against traditional LoRA, I just ran QLoRA and I managed to get a model that mostly solved a task in a few hours using a regular GPU. However, the tokens/second and cost/token were both worse than using GPT3.5 Turbo.

tabacof avatar Jun 06 '23 12:06 tabacof

Hugging face published a timely blog post for QLoRA on Falcon: https://huggingface.co/blog/falcon

limcheekin avatar Jun 08 '23 06:06 limcheekin

I prefer this post: https://forum.opennmt.net/t/opennmt-py-v3-2-released-plenty-of-new-features/5366 ;-)

vince62s avatar Jun 08 '23 07:06 vince62s

We have created a script to convert models trained with QLoRA to CTranslate2 to speed up inference here https://github.com/Actable-AI/llm-utils/blob/main/qlora2ct2/convert_qlora2_ct2.py

trannhatquy avatar Jun 27 '23 13:06 trannhatquy