[Model] Add SupportsMultiModal.get_language_model interface (#16007)
Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user