vllm icon indicating copy to clipboard operation
vllm copied to clipboard

[Feature]: LoRA support for LLama 3.2 Vision Models

Open Gladiator07 opened this issue 1 year ago • 9 comments

🚀 The feature, motivation and pitch

I tried loading finetuned LoRA for llama 3.2 11B vision instruct using the serve command (OpenAI client) and get this error message.

ERROR 12-02 00:02:57 engine.py:366] NotImplementedError: LoRA is currently not currently supported with encoder/decoder models.

I finetuned the LoRA using unsloth's implementation. It would be great if we can have the support for LoRA for multimodal models as our team wants to use multiple LoRAs and merging the LoRA adapters to original model weights is not feasible for us. We are short on time for this project and as far as I can tell no other framework supports LoRA in this way. Also we need outlines for structured generation so vLLM (being the most user friendly, stable and mature framework ) is our best bet now. Can we get a timeline when will this be supported ? Also are there any workarounds possible until this feature is officially supported ?

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • [X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Gladiator07 avatar Dec 02 '24 08:12 Gladiator07

Do you have LoRA weights on the multimodal encoder or just the text decoder? The latter is more feasible but even in that case, we currently don't have any existing enc-dec models that use LoRA yet. @jeejeelee any thoughts on this?

DarkLight1337 avatar Dec 02 '24 08:12 DarkLight1337

There are plans to support this, but it's not a high priority. It may take 1-2 months.

jeejeelee avatar Dec 02 '24 08:12 jeejeelee

There are plans to support this, but it's not a high priority. It may take 1-2 months.

Are you referring to encoder-decoder support or multimodal support?

DarkLight1337 avatar Dec 02 '24 08:12 DarkLight1337

There are plans to support this, but it's not a high priority. It may take 1-2 months.

Are you referring to encoder-decoder support or multimodal support?

encoder-decoder. The priority for multimodal should be before encoder-decoder

jeejeelee avatar Dec 02 '24 08:12 jeejeelee

Do you have LoRA weights on the multimodal encoder or just the text decoder? The latter is more feasible but even in that case, we currently don't have any existing enc-dec models that use LoRA yet. @jeejeelee any thoughts on this?

I have LoRA weights for both encoder and text decoder. If the text decoder is feasible I will not add LoRA to vision encoder if it matches our evaluation criteria. Can you guide how to just use the text decoder LoRA ?

Gladiator07 avatar Dec 02 '24 08:12 Gladiator07

For the mllama model, it currently doesn't support lora because it's an encoder-decoder multimodal model. Other models, such as Idefics3, support text decoder LoRA

jeejeelee avatar Dec 02 '24 08:12 jeejeelee

Okay. Does Qwen2VLForConditionalGeneration support text decoder LoRA. If yes, how does it work ? We can just pass it as a normal LoRA path as we do for text models while running vllm serve command ?

Gladiator07 avatar Dec 02 '24 08:12 Gladiator07

Qwen2VL

Yeah, it should be noted that when training lora, it can only be added to the text decoder.

jeejeelee avatar Dec 02 '24 09:12 jeejeelee

This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!

github-actions[bot] avatar Mar 03 '25 02:03 github-actions[bot]

This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!

github-actions[bot] avatar Apr 02 '25 02:04 github-actions[bot]