mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-26 17:47:53 +08:00
added abstract methods to the base class
This commit is contained in:
parent
94dce5c3d9
commit
da0adea88e
@ -1389,6 +1389,22 @@ class BaseMultiModalProcessor(ABC, Generic[_I]):
|
|||||||
"""Given the HF-processed data, output the metadata of each field."""
|
"""Given the HF-processed data, output the metadata of each field."""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def get_num_mm_encoder_tokens(
|
||||||
|
self,
|
||||||
|
num_image_tokens: int,
|
||||||
|
) -> int:
|
||||||
|
"""Given the number of image tokens, output the number of multi-modal encoder tokens"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def get_num_mm_connector_tokens(
|
||||||
|
self,
|
||||||
|
num_vision_tokens: int,
|
||||||
|
) -> int:
|
||||||
|
"""Given the number of vision tokens, output the number of multi-modal connector tokens"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def _get_prompt_updates(
|
def _get_prompt_updates(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user