From 042d131f394d9069ea9b472a2f5adad64b6e2df1 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Mon, 7 Jul 2025 22:13:52 +0100 Subject: [PATCH] Fix links in multi-modal model contributing page (#18615) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- docs/contributing/model/multimodal.md | 2 +- vllm/model_executor/models/interfaces.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/contributing/model/multimodal.md b/docs/contributing/model/multimodal.md index ed1cd46dd8585..64daa9c2d4cdd 100644 --- a/docs/contributing/model/multimodal.md +++ b/docs/contributing/model/multimodal.md @@ -819,7 +819,7 @@ Each [PromptUpdate][vllm.multimodal.processing.PromptUpdate] instance specifies After you have defined [BaseProcessingInfo][vllm.multimodal.processing.BaseProcessingInfo] (Step 2), [BaseDummyInputsBuilder][vllm.multimodal.profiling.BaseDummyInputsBuilder] (Step 3), and [BaseMultiModalProcessor][vllm.multimodal.processing.BaseMultiModalProcessor] (Step 4), -decorate the model class with {meth}`MULTIMODAL_REGISTRY.register_processor ` +decorate the model class with [MULTIMODAL_REGISTRY.register_processor][vllm.multimodal.processing.MultiModalRegistry.register_processor] to register them to the multi-modal registry: ```diff diff --git a/vllm/model_executor/models/interfaces.py b/vllm/model_executor/models/interfaces.py index a018bd5d09d9a..3863d8454bffb 100644 --- a/vllm/model_executor/models/interfaces.py +++ b/vllm/model_executor/models/interfaces.py @@ -89,11 +89,22 @@ class SupportsMultiModal(Protocol): ) -> Tensor: ... + # TODO: Remove this overload once v0 is deprecated @overload def get_input_embeddings( self, input_ids: Tensor, multimodal_embeddings: Optional[MultiModalEmbeddings] = None, + ) -> Tensor: + ... + + def get_input_embeddings( + self, + input_ids: Tensor, + multimodal_embeddings: Optional[MultiModalEmbeddings] = None, + # Only necessary so that the v0 overload is valid + # TODO: Remove attn_metadata once v0 is deprecated + attn_metadata: Optional["AttentionMetadata"] = None, ) -> Tensor: """ Returns the input embeddings merged from the text embeddings from