[Doc] Add model development API Reference (#11884)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -38,13 +38,15 @@ class SupportsMultiModal(Protocol):
|
||||
to be merged with text embeddings.
|
||||
|
||||
The output embeddings must be one of the following formats:
|
||||
|
||||
- A list or tuple of 2D tensors, where each tensor corresponds to
|
||||
each input multimodal data item (e.g, image).
|
||||
each input multimodal data item (e.g, image).
|
||||
- A single 3D tensor, with the batch dimension grouping the 2D tensors.
|
||||
|
||||
NOTE: The returned multimodal embeddings must be in the same order as
|
||||
the appearances of their corresponding multimodal data item in the
|
||||
input prompt.
|
||||
Note:
|
||||
The returned multimodal embeddings must be in the same order as
|
||||
the appearances of their corresponding multimodal data item in the
|
||||
input prompt.
|
||||
"""
|
||||
...
|
||||
|
||||
@@ -59,6 +61,7 @@ class SupportsMultiModal(Protocol):
|
||||
) -> torch.Tensor:
|
||||
...
|
||||
|
||||
@overload
|
||||
def get_input_embeddings(
|
||||
self,
|
||||
input_ids: torch.Tensor,
|
||||
|
||||
Reference in New Issue
Block a user