Skip to content

[Model Runner V2] Fix mrv2 mm lora issue#44450

Merged
yewentao256 merged 3 commits into
mainfrom
wentao-mrv2-lora
Jun 8, 2026
Merged

[Model Runner V2] Fix mrv2 mm lora issue#44450
yewentao256 merged 3 commits into
mainfrom
wentao-mrv2-lora

Conversation

@yewentao256

Copy link
Copy Markdown
Member

Purpose

VLLM_USE_V2_MODEL_RUNNER=1 pytest tests/lora/test_qwenvl.py::test_qwen3vl_vision_lora -xvs

tests/lora/test_qwenvl.py:258: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.lora.test_qwenvl.Qwen2VLTester object at 0x7f388114db50>
images = [ImageAsset(name='stop_sign'), ImageAsset(name='cherry_blossom')]
expected_outputs = ['A red stop sign stands prominently in the foreground, with a traditional Chinese gate and a black SUV in the backgro...majestic skyscraper stands tall, partially obscured by a vibrant canopy of cherry blossoms, against a clear blue sky.']
lora_id = 1, lora_name = None, temperature = 0, max_tokens = 5

    def run_test(
        self,
        images: list[ImageAsset],
        expected_outputs: list[str],
        lora_id: int | None = None,
        lora_name: str | None = None,
        temperature: float = 0,
        max_tokens: int = 5,
    ):
        sampling_params = vllm.SamplingParams(
            temperature=temperature,
            max_tokens=max_tokens,
        )
        inputs = [
            {
                "prompt": self.PROMPT_TEMPLATE,
                "multi_modal_data": {"image": asset.pil_image},
            }
            for asset in images
        ]
    
        lora_request = LoRARequest(
            lora_name if lora_name else str(lora_id), lora_id, self.config.lora_path
        )
        outputs = self.llm.generate(inputs, sampling_params, lora_request=lora_request)
        generated_texts = [output.outputs[0].text.strip() for output in outputs]
        # Validate outputs
        for generated, expected in zip(generated_texts, expected_outputs):
>           assert expected.startswith(generated), (
                f"Generated text {generated} doesn't match expected pattern {expected}"
            )
E           AssertionError: Generated text A majestic tower stands tall doesn't match expected pattern A majestic skyscraper stands tall, partially obscured by a vibrant canopy of cherry blossoms, against a clear blue sky.
E           assert False
E            +  where False = <built-in method startswith of str object at 0x7f38811280d0>('A majestic tower stands tall')
E            +    where <built-in method startswith of str object at 0x7f38811280d0> = 'A majestic skyscraper stands tall, partially obscured by a vibrant canopy of cherry blossoms, against a clear blue sky.'.startswith

tests/lora/test_qwenvl.py:105: AssertionError

Now

========================================== 1 passed, 17 warnings in 48.89s ===========================================

Signed-off-by: yewentao256 <zhyanwentao@126.com>
@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Jun 3, 2026
@mergify mergify Bot added the v1 label Jun 3, 2026
@njhill njhill requested a review from jeejeelee June 3, 2026 21:17

@yewentao256 yewentao256 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@jeejeelee jeejeelee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we enable at least one unit test for this case?

Signed-off-by: yewentao256 <zhyanwentao@126.com>

@yewentao256 yewentao256 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks @jeejeelee ! Done

@jeejeelee jeejeelee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, sorry for the delayed response

@yewentao256 yewentao256 merged commit 2c27c29 into main Jun 8, 2026
63 checks passed
@yewentao256 yewentao256 deleted the wentao-mrv2-lora branch June 8, 2026 18:30
ekagra-ranjan pushed a commit to ekagra-ranjan/vllm that referenced this pull request Jun 9, 2026
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Ekagra Ranjan <3116519+ekagra-ranjan@users.noreply.github.com>
waqahmed-amd-fi pushed a commit to waqahmed-amd-fi/vllm that referenced this pull request Jun 10, 2026
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: Waqar Ahmed <waqar.ahmed@amd.com>
Saddss pushed a commit to Saddss/vllm that referenced this pull request Jun 14, 2026
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants