A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix] Fix Qwen3-VL max_num_video_tokens calculation for video profiling (#25648)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Isotr0py committed
Sep 25, 2025 at 18:36 UTC
17b4c6685ce62d5652654784d6771a3d38e4273e
2 files changed
+13
-1
vllm/model_executor/models/qwen2_vl.py
+1
-1
@@ -82,7 +82,7 @@ from .vision import get_vit_attn_backend, run_dp_sharded_mrope_vision_model
82
logger = init_logger(__name__)
83
84
# For profile run
85
-_MAX_FRAMES_PER_VIDEO = 600
85
+_MAX_FRAMES_PER_VIDEO = 32
86
87
# === Vision Inputs === #
88
vllm/model_executor/models/qwen3_vl.py
+12
@@ -715,6 +715,18 @@ class Qwen3VLDummyInputsBuilder(BaseDummyInputsBuilder[Qwen3VLProcessingInfo]):
715
video_items.append(video_item)
716
return video_items
717
718
+ def get_dummy_processor_inputs(self, seq_len, mm_counts):
719
+ processor_inputs = super().get_dummy_processor_inputs(
720
+ seq_len, mm_counts)
721
+ # HACK(Isotr0py): We set do_resize to False here to reuse Qwen2-VL's
722
+ # profiling logic, which will be problematic for configurable mm
723
+ # profiling.
724
+ # TODO(Isotr0py): Switch to the implementation in
725
+ # https://github.com/vllm-project/vllm/pull/25557
726
+ # after supporting configurable mm profiling.
727
+ processor_inputs.hf_processor_mm_kwargs = {"do_resize": False}
728
+ return processor_inputs
729
+
730
731
class Qwen3VLMultiModalProcessor(BaseMultiModalProcessor[Qwen3VLProcessingInfo]
732
):