-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
[Core] Remove lora additional vocabulary #23540
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
base: main
Are you sure you want to change the base?
[Core] Remove lora additional vocabulary #23540
Conversation
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.
Code Review
This pull request removes the functionality for LoRA adapters to have their own additional vocabulary, which simplifies the LoRA implementation across the codebase. The changes are extensive and touch many files, primarily removing lora_extra_vocab_size and related logic.
The changes are generally correct and align with the goal of the PR. I've identified a few areas where the code can be cleaned up for better maintainability, such as removing redundant code blocks and expressions. These patterns are repeated across several model definition files, and I've provided examples in the comments. Addressing them would improve the overall code quality.
vllm/lora/layers.py
Outdated
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.
vllm/model_executor/models/bamba.py
Outdated
| lora_vocab = ((0 * | ||
| (lora_config.max_loras or 1)) if lora_config else 0) |
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.
| if lora_config: | ||
| unpadded_vocab_size += lora_config.lora_extra_vocab_size | ||
| # No additional vocabulary for LoRA |
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.
d0dd2eb to
fbea0b6
Compare
|
As a start, maybe it would be better to just provide a deprecation warning for |
Oh I see. So we should hold this PR and just add warning info to users at this moment right? |
I think so |
2634859 to
e0018fc
Compare
I just made another one-line PR #23635 for adding the warning, and we may hold this PR until you believe it's time to deprecate this feature completely. What's your opinion on this? |
e6239d0 to
a4677dd
Compare
|
I have trigged the lora testing to verify these changes |
|
All LoRA tests are failing. Could you take a closer look into this? @ahengljh |
Yes, I noticed that and will try to fix them |
|
This pull request has merge conflicts that must be resolved before it can be |
|
@ahengljh could we speed up a bit? Thank you. |
f7ad2ef to
2f5ee25
Compare
I have been trying run the lora tests on my local machine but I found that even I ran them on the main branch, they still fail, which seems difficult for me to debug. I need to investigate and try more. |
|
This pull request has merge conflicts that must be resolved before it can be |
007c50e to
1606db4
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
@ahengljh Would you like to continue working on this PR? If so, could you resolve the conflicts first? |
Yes, of course, and sorry for being late, I can solve conflicts first. But there has been some problems on my local gpu env to run tests to debug. So I may need a little help on passing tests. |
|
Okay, please feel free to ping me on slack |
1606db4 to
ee013d7
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
@ahengljh @jeejeelee Do we have any updates? 😅 |
|
Sorry for missing this PR, @ahengljh would you like to continue working on this PR? |
Purpose
This PR removes the ability for each LoRA adapter to define its own additional
vocabulary, as proposed in issue #23474. All LoRA adapters for a given model now
share the same vocabulary as the base model.
Test Plan
Test Result
(Optional) Documentation Update
No documentation updates required as this removes an undocumented internal feature.
Essential Elements of an Effective PR Description Checklist
- [X] The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)". - [X] The test plan, such as providing test command. - [X] The test results, such as pasting the results comparison before and after, or e2e results - [ ] (Optional) The necessary documentation update, such as updating `supported_models.md` and `examples` for a new model.