Skip to content

[Bugfix][LoRA] Use an explicit capability flag for tower connector LoRA - #53092

Open
linitra24 wants to merge 1 commit into
vllm-project:mainfrom
linitra24:fix/tower-connector-lora-capability
Open

[Bugfix][LoRA] Use an explicit capability flag for tower connector LoRA#53092
linitra24 wants to merge 1 commit into
vllm-project:mainfrom
linitra24:fix/tower-connector-lora-capability

Conversation

@linitra24

@linitra24 linitra24 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

get_num_mm_encoder_tokens is defined on SupportsMultiModal, so every model that inherits this interface has the method even if it does not implement it. Therefore, the previous hasattr check always returned True for multimodal models and could incorrectly enable tower connector LoRA.

Replace the hasattr(model, "get_num_mm_encoder_tokens") check with an explicit supports_tower_connector_lora capability flag.

Purpose

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • 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.

Signed-off-by: linitra24 <Joy25810@foxmail.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@linitra24 linitra24 changed the title [LoRA] Use an explicit capability flag for tower connector LoRA [Bugfix][LoRA] Use an explicit capability flag for tower connector LoRA Aug 20, 2026
@mergify mergify Bot added llama Related to Llama models mistral Related to Mistral models qwen Related to Qwen models glm bug Something isn't working labels Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working glm llama Related to Llama models mistral Related to Mistral models qwen Related to Qwen models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant