Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaowei Jiang <xwjiang2010@gmail.com>
  • Loading branch information
xwjiang2010 committed Jun 26, 2024
1 parent 5b3e9aa commit b7acf3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/models/vlm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To initialize a VLM, the aforementioned arguments must be passed to the ``LLM``
To pass an image to the model, note the following in :class:`vllm.inputs.PromptStrictInputs`:

* ``prompt``: The prompt should have a number of ``<image>`` tokens equal to ``image_feature_size``.
* ``multi_modal_data``: This is a loosely structured dict that contains multi modal data.
* ``multi_modal_data``: This is a dictionary that contains multi-modal data.

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion vllm/multimodal/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_internal_data_type(self) -> Type[D]:
raise NotImplementedError

@abstractmethod
def get_external_data_type(self) -> Tuple[str, EXTERNAL_MM_DATA_TYPE]:
def get_external_data_type(self) -> Tuple[str, Type[EXTERNAL_MM_DATA_TYPE]]:
"""The data type that this plugin handles.
For `LLM.generate(multi_modal_data={"key": value})` will
Expand Down
2 changes: 1 addition & 1 deletion vllm/multimodal/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _get_plugin_for_external_data_type(self, key: str,
if plugin is not None:
return plugin

msg = f"Unknown multi-modal data type: {data_type}"
msg = f"No plugin found for key {key} and type {data_type}"
raise NotImplementedError(msg)

def _get_plugin_for_internal_data_type(self,
Expand Down

0 comments on commit b7acf3a

Please sign in to comment.