-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[Model] Add LoRA support for TransformersModel #13770
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
[Model] Add LoRA support for TransformersModel #13770
Conversation
jeejeelee
commented
Feb 24, 2025
•
edited by github-actions
bot
Loading
edited by github-actions
bot
- Add unit test
- Update docs
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run 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 either: Add 🚀 |
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
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.
This is nice, thank you for adding LoRA support!
I've made a suggestion that allows the can_replace_layer
methods to get the parent_cls
of the HFCompatibleLinear
so that the equivalent of _is_hf_linear
can live inside HFCompatibleLinear
. Let me know what you think!
621441b
to
f945195
Compare
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 making the suggested changes.
One final suggestion is that we reuse the subclassing used for HFCompatibleLinear
to create a HFCompatibleLoRA
. It feels like less of a hack than replacing the forward
method of the instance itself.
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.
LGTM!
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
1770035
to
f0b94cc
Compare
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>