-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Model][LoRA]LoRA support added for Qwen2VLForConditionalGeneration #10022
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
"gate_up_proj", | ||
"down_proj", | ||
] | ||
embedding_modules = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although vllm currently only supports lora inference for language model, considering that inference for vision modules will be supported in the future, we should also add vision encoder related modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, currently fine-tuning only the language model with LoRA achieves good results and meets the needs of most users. Further optimizations can be made later if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree with your view. I just think it might be better to complete the additions first. If you're interested, you can refer to Qwen-VL's implementation, see: https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/qwen.py#L1015-L1046.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll take a look.
You can run |
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
Signed-off-by: ericperfect <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you could add TODO above the supported_lora_modules
, indicating that we need to add LoRA for the visual encoder in the future. Additionally, you need to update the documentation to specify that this model supports LoRA.
…sage and update documentation. Signed-off-by: ericperfect <[email protected]>
Thanks, I already have added the TODO information and updated the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this!
Also thanks @jeejeelee for the review
…llm-project#10022) Signed-off-by: ericperfect <[email protected]> Signed-off-by: Loc Huynh <[email protected]>
…llm-project#10022) Signed-off-by: ericperfect <[email protected]> Signed-off-by: Sumit Dubey <[email protected]>
[Model][LoRA]LoRA support added for Qwen2VLForConditionalGeneration
LoRA supported for inference in Qwen2VL
ping @ywang96 @DarkLight1337