mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-03-31 12:57:09 +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."""
|
||||
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
|
||||
def _get_prompt_updates(
|
||||
self,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user