Skip to content

Conversation

@mickqian
Copy link
Collaborator

@mickqian mickqian commented Sep 29, 2025

Motivation

Modifications

  1. models that are less popular, or with similar architectures (qwen2VL to qwen2_5VL) are removed from pr-test
  2. resume a mistakenly deleted ut (test_mixed_batch)

Accuracy Tests

Benchmarking and Profiling

Checklist

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @mickqian, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request aims to optimize the Continuous Integration (CI) process by reducing the overall number of Vision-Language Model (VLM) unit tests and consolidating the remaining tests into fewer files. This streamlining effort enhances the efficiency and maintainability of the test suite, ensuring faster feedback cycles while maintaining essential test coverage.

Highlights

  • Test File Consolidation: Tests previously spread across test_vision_openai_server_a.py and test_vision_openai_server_b.py have been consolidated into test_vision_openai_server_a.py, leading to the removal of test_vision_openai_server_b.py.
  • VLM Unit Test Reduction: Several Vision-Language Model (VLM) unit tests, including TestQwen2VLServer, TestPhi4MMServer, TestPixtralServer, TestMistral3_1Server, TestDeepseekVL2Server, TestJanusProServer, TestGemma3nServer, and TestQwen2AudioServer, have been removed from the CI suite to streamline testing.
  • Updated Mllama Server Test: The TestMllamaServer test has been re-enabled, updated to use the meta-llama/Llama-3.2-11B-Vision-Instruct model, and its server launch arguments have been simplified.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 refactors the vision language model (VLM) unit tests, likely to reduce CI execution time. It combines tests from test_vision_openai_server_b.py into test_vision_openai_server_a.py, removes the former file, and also removes several test classes. The changes are logical and align with the goal of optimizing CI. My main feedback is on improving maintainability by reducing code duplication in the test setup methods, as new test classes with duplicated logic are being added.

@mickqian mickqian changed the title ci: reduce vlm ut and combine test files ci: reduce and refactor vlm ut and combine test files Sep 29, 2025
Comment on lines 1796 to 1851
if self.forward_mode.is_decode_or_idle():
attention_backend_str = global_server_args_dict["decode_attention_backend"]
else:
attention_backend_str = global_server_args_dict["prefill_attention_backend"]
# Create seq_lens_cpu when needed
if (
not global_server_args_dict["use_mla_backend"]
and attention_backend_str == "flashinfer"
):
# for meta-llama/Llama-3.2-11B-Vision-Instruct
seq_lens_cpu = None
else:
seq_lens_cpu = (
seq_lens_cpu_cache
if seq_lens_cpu_cache is not None
else self.seq_lens.cpu()
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is ugly bro () Why we use this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previously mllama-3.1 is not included in Pr-test, when I add it back in, the bug above appears

Copy link
Collaborator

Choose a reason for hiding this comment

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

/gemini why there is a bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

The bug arises specifically for the meta-llama/Llama-3.2-11B-Vision-Instruct model (which I believe is what you're referring to as mllama-3.1) when it's used with the flashinfer attention backend and without the MLA backend. For this particular model and configuration, seq_lens_cpu needs to be None for correct operation. The added if condition handles this edge case, ensuring compatibility for Llama-3.2-11B-Vision-Instruct.

"--mem-fraction-static",
"0.70",
"--enable-multimodal",
"--cuda-graph-max-bs",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we add the cuda graph max bs = 4 to base class?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

better not, otherwise some model not being able to load in real cases will be able to in CI

Copy link
Collaborator

@JustinTong0323 JustinTong0323 left a comment

Choose a reason for hiding this comment

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

LGTM

model = "Qwen/Qwen2.5-VL-7B-Instruct"
extra_args = [
"--mem-fraction-static",
"0.35",
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Can we remove all --mem-fraction-static in this file (and nightly tests) so that we can test our auto mem-fraction-static logics?
  • Can you tune our auto mem fraction static logic to match here
    ```
    [2025-08-11 17:17:03] max_total_num_tokens=665690, chunked_prefill_size=8192, max_prefill_tokens=16384, max_running_requests=4096, context_len=65536, available_gpu_mem=13.50 GB
    ```
    Check the `available_gpu_mem` value.
    - If it is between 5–8 GB, the setting is good.
    - If it is too high (e.g., 10 - 20 GB), increase `--mem-fraction-static` to allocate more memory to the KV cache.
    - If it is too low, you risk out-of-memory (OOM) errors later, so decrease `--mem-fraction-static`.
    . Maybe we need to reserve a little bit more for VLMs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes we should reserve more memories for VLMs.
Although the most frequent reasons for specifying a low --mem-fraction-static is for long-inputs, e.g. video inputs.
Except from video input, we might find a strategy to set the --mem-fraction-static well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

--mem-fraction-static in this file all removed

@mickqian mickqian force-pushed the fix-ci branch 2 times, most recently from 055d0d1 to e1bef17 Compare October 12, 2025 17:12
@mickqian mickqian requested a review from zhyncs as a code owner October 13, 2025 05:25
@mickqian mickqian enabled auto-merge (squash) October 13, 2025 14:01
@mickqian mickqian force-pushed the fix-ci branch 3 times, most recently from 473689a to cd9c610 Compare October 16, 2025 02:45
@mickqian mickqian merged commit 3e4c7da into sgl-project:main Oct 17, 2025
46 of 70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants