@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / b1cc4dfef5
Fork 0

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 15, 19:45 UTC

[VLM] Support loading InternVideo2.5 models as original InternVLChatModel (#14738)

Signed-off-by: Isotr0py <2037008807@qq.com>

Isotr0py committed Mar 13, 2025 at 18:10 UTC b1cc4dfef57ac0f3e27575215f771f0c25706b81
2 files changed +10 -3
docs/source/models/supported_models.md
+2 -2
@@ -786,9 +786,9 @@ See [this page](#generative-models) for more information on how to use generativ
786 *
787 * ✅︎
788 - * `InternVLChatModel`
789 - * InternVL 2.5, Mono-InternVL, InternVL 2.0
789 + * InternVideo 2.5, InternVL 2.5, Mono-InternVL, InternVL 2.0
790 * T + I<sup>E+</sup>
791 - * `OpenGVLab/InternVL2_5-4B`, `OpenGVLab/Mono-InternVL-2B`, `OpenGVLab/InternVL2-4B`, etc.
791 + * `OpenGVLab/InternVideo2_5_Chat_8B`, `OpenGVLab/InternVL2_5-4B`, `OpenGVLab/Mono-InternVL-2B`, `OpenGVLab/InternVL2-4B`, etc.
792 *
793 * ✅︎
794 * ✅︎
vllm/model_executor/models/internvl.py
+8 -1
@@ -981,5 +981,12 @@ class InternVLChatModel(nn.Module, SupportsMultiModal, SupportsPP):
981
982 def load_weights(self, weights: Iterable[Tuple[str,
983 torch.Tensor]]) -> Set[str]:
984 - loader = AutoWeightsLoader(self)
984 + # unused modules appear in OpenGVLab/InternVideo2_5_Chat_8B
985 + skip_prefixes = [
986 + "action_embed", "temporal_embed", "track_embed",
987 + "track_embed_decoder", "box_token", "cg_criterion", "cg_model",
988 + "loc_encoder", "loc_decoder", "sam", "temporal_token",
989 + "track_token"
990 + ]
991 + loader = AutoWeightsLoader(self, skip_prefixes=skip_prefixes)
992 return loader.load_weights(weights)