added abstract methods to the base class

This commit is contained in:
Anexdeus 2025-12-16 22:40:40 +03:00
parent 94dce5c3d9
commit da0adea88e

View File

@ -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,