[Model] Add SupportsMultiModal.get_language_model interface (#16007)

Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
Nicolò Lucchesi
2025-04-09 04:12:54 -07:00
committed by GitHub
parent 04149cce27
commit d55244df31
33 changed files with 116 additions and 0 deletions
+12
View File
@@ -56,6 +56,18 @@ class SupportsMultiModal(Protocol):
"""
...
def get_language_model(self) -> torch.nn.Module:
"""
Returns the underlying language model used for text generation.
This is typically the `torch.nn.Module` instance responsible for
processing the merged multimodal embeddings and producing hidden states
Returns:
torch.nn.Module: The core language model component.
"""
...
# Only for models that support v0 chunked prefill
# TODO(ywang96): Remove this overload once v0 is deprecated
@overload