- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
[Bugfix][Model] Support (zero-padded) LoRA on Qwen3 output embedding #26115
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?
[Bugfix][Model] Support (zero-padded) LoRA on Qwen3 output embedding #26115
Conversation
Signed-off-by: kurt <kurt@thinkingmachines.ai>
| 👋 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  You ask your reviewers to trigger select CI tests on top of  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  If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. 🚀 | 
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 introduces two key features: support for LoRA on the embedding and unembedding layers for Qwen3 models, and the ability to use LoRA without expanding the vocabulary by setting lora_extra_vocab_size=0. The changes are well-implemented across the configuration, LoRA layers, and model definitions. The logic correctly handles the zero vocabulary padding case by conditionally executing code related to extra vocabulary embeddings. The pull request also includes a comprehensive suite of new tests that validate these changes, ensuring correctness and preventing regressions. The code quality is high, and I did not find any issues.
Signed-off-by: kurt <kurt@thinkingmachines.ai>
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.
Thank you for your contribution, we are currently removing LoRA with extra vocal size, see: #23540
| Thanks @jeejeelee, in that case I can wait for that PR to merge and rebase on top (so i'll just have the qwen3 unembed changes). Alternatively, I may just remove the vocab changes from this PR proactively. Will give it a few days (or please let me know what approach you'd prefer) | 
| These conflicts are caused by our migration to  | 
| This pull request has merge conflicts that must be resolved before it can be | 
Purpose
This PR achieves two goals:
Test Plan
I've added a comprehensive test suite in
tests/lora/test_qwen3_unembed.py, as well as tests intests/lora/test_layers.py, that verify the changes work.Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.