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
[Model] Enable video support for InternVL3.5 models (#23658)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Isotr0py committed
Aug 27, 2025 at 03:46 UTC
9816b81f5f9f85391dc30ae5f48185542dfec2af
5 files changed
+22
-7
docs/models/supported_models.md
+2
-2
@@ -627,7 +627,7 @@ These models primarily accept the [`LLM.generate`](./generative_models.md#llmgen
627
| `H2OVLChatModel` | H2OVL | T + I<sup>E+</sup> | `h2oai/h2ovl-mississippi-800m`, `h2oai/h2ovl-mississippi-2b`, etc. | | ✅︎ | ✅︎ |
628
| `Idefics3ForConditionalGeneration` | Idefics3 | T + I | `HuggingFaceM4/Idefics3-8B-Llama3`, etc. | ✅︎ | | ✅︎ |
629
| `InternS1ForConditionalGeneration` | Intern-S1 | T + I<sup>E+</sup> + V<sup>E+</sup> | `internlm/Intern-S1`, etc. | ✅︎ | ✅︎ | ✅︎ |
630
-| `InternVLChatModel` | InternVL 3.0, InternVideo 2.5, InternVL 2.5, Mono-InternVL, InternVL 2.0 | T + I<sup>E+</sup> + (V<sup>E+</sup>) | `OpenGVLab/InternVL3-9B`, `OpenGVLab/InternVideo2_5_Chat_8B`, `OpenGVLab/InternVL2_5-4B`, `OpenGVLab/Mono-InternVL-2B`, `OpenGVLab/InternVL2-4B`, etc. | ✅︎ | ✅︎ | ✅︎ |
630
+| `InternVLChatModel` | InternVL 3.5, InternVL 3.0, InternVideo 2.5, InternVL 2.5, Mono-InternVL, InternVL 2.0 | T + I<sup>E+</sup> + (V<sup>E+</sup>) | `OpenGVLab/InternVL3_5-14B`, `OpenGVLab/InternVL3-9B`, `OpenGVLab/InternVideo2_5_Chat_8B`, `OpenGVLab/InternVL2_5-4B`, `OpenGVLab/Mono-InternVL-2B`, `OpenGVLab/InternVL2-4B`, etc. | ✅︎ | ✅︎ | ✅︎ |
631
| `KeyeForConditionalGeneration` | Keye-VL-8B-Preview | T + I<sup>E+</sup> + V<sup>E+</sup> | `Kwai-Keye/Keye-VL-8B-Preview` | | | ✅︎ |
632
| `KimiVLForConditionalGeneration` | Kimi-VL-A3B-Instruct, Kimi-VL-A3B-Thinking | T + I<sup>+</sup> | `moonshotai/Kimi-VL-A3B-Instruct`, `moonshotai/Kimi-VL-A3B-Thinking` | | ✅︎ | ✅︎ |
633
| `Llama4ForConditionalGeneration` | Llama 4 | T + I<sup>+</sup> | `meta-llama/Llama-4-Scout-17B-16E-Instruct`, `meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8`, `meta-llama/Llama-4-Maverick-17B-128E-Instruct`, etc. | | ✅︎ | ✅︎ |
@@ -701,7 +701,7 @@ Some models are supported only via the [Transformers backend](#transformers). Th
701
- There's no PLE caching or out-of-memory swapping support, as described in [Google's blog](https://developers.googleblog.com/en/introducing-gemma-3n/). These features might be too model-specific for vLLM, and swapping in particular may be better suited for constrained setups.
702
703
!!! note
704
- Only `InternVLChatModel` with Qwen2.5 text backbone (`OpenGVLab/InternVL3-2B`, `OpenGVLab/InternVL2.5-1B` etc) has video inputs support currently.
704
+ For `InternVLChatModel`, only InternVL2.5 with Qwen2.5 text backbone (`OpenGVLab/InternVL2.5-1B` etc), InternVL3 and InternVL3.5 have video inputs support currently.
705
706
!!! note
707
To use `TIGER-Lab/Mantis-8B-siglip-llama3`, you have to pass `--hf_overrides '{"architectures": ["MantisForConditionalGeneration"]}'` when running vLLM.
tests/models/multimodal/processing/test_common.py
+3
@@ -286,6 +286,9 @@ def _test_processing_correctness_one(
286
"internlm/Intern-S1",
287
"OpenGVLab/InternVL2-1B",
288
"OpenGVLab/InternVL3-1B",
289
+ "OpenGVLab/InternVL3_5-1B",
290
+ "OpenGVLab/InternVL3_5-GPT-OSS-20B-A4B-Preview",
291
+ "OpenGVLab/InternVL3_5-30B-A3B",
292
"Kwai-Keye/Keye-VL-8B-Preview",
293
"moonshotai/Kimi-VL-A3B-Instruct",
294
"meta-llama/Llama-4-Scout-17B-16E-Instruct",
tests/models/multimodal/processing/test_tensor_schema.py
+6
-1
@@ -38,7 +38,12 @@ ARCH_NEEDS_EXTRAS = [
38
"MiniCPMV",
39
"PaliGemmaForConditionalGeneration",
40
]
41
-REPO_ID_TO_SKIP = {"nm-testing/pixtral-12b-FP8-dynamic": "duplicated test"}
41
+REPO_ID_TO_SKIP = {
42
+ "nm-testing/pixtral-12b-FP8-dynamic": "duplicated test",
43
+ # FIXME(Isotr0py): enable GPT-OSS based InternVL3.5 model
44
+ # after support PP for GPT-OSS
45
+ "OpenGVLab/InternVL3_5-GPT-OSS-20B-A4B-Preview": "Broken model",
46
+}
47
48
ImageInput = list[Image.Image]
49
VideoInput = Union[list[Image.Image], list[np.ndarray],
tests/models/registry.py
+4
-1
@@ -422,7 +422,10 @@ _MULTIMODAL_EXAMPLE_MODELS = {
422
trust_remote_code=True), # noqa: E501
423
"InternVLChatModel": _HfExamplesInfo("OpenGVLab/InternVL2-1B",
424
extras={"2B": "OpenGVLab/InternVL2-2B",
425
- "3.0": "OpenGVLab/InternVL3-1B"}, # noqa: E501
425
+ "3.0": "OpenGVLab/InternVL3-1B", # noqa: E501
426
+ "3.5-qwen3": "OpenGVLab/InternVL3_5-1B", # noqa: E501
427
+ "3.5-qwen3moe": "OpenGVLab/InternVL3_5-30B-A3B", # noqa: E501
428
+ "3.5-gptoss": "OpenGVLab/InternVL3_5-GPT-OSS-20B-A4B-Preview"}, # noqa: E501
429
trust_remote_code=True),
430
"KeyeForConditionalGeneration": _HfExamplesInfo("Kwai-Keye/Keye-VL-8B-Preview", # noqa: E501
431
trust_remote_code=True),
vllm/model_executor/models/internvl.py
+7
-3
@@ -855,9 +855,13 @@ class InternVLProcessingInfo(BaseInternVLProcessingInfo):
855
856
def get_video_token(self) -> Optional[str]:
857
text_model_type = self.get_hf_config().get_text_config().model_type
858
- if text_model_type == "qwen2":
859
- return "<|video_pad|>"
860
- return None
858
+ video_token_map = {
859
+ "qwen2": "<|video_pad|>",
860
+ "qwen3": "<|video_pad|>",
861
+ "qwen3_moe": "<|video_pad|>",
862
+ "gpt_oss": "<|reserved_200000|>",
863
+ }
864
+ return video_token_map.get(text_model_type)
865
866
def get_num_frames_with_most_features(
867
self,