[Misc] Move config fields to MultiModalConfig (#17343)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-04-29 06:37:21 +00:00
committed by GitHub
parent cde384cd92
commit ebb3930d28
8 changed files with 62 additions and 36 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ from vllm.utils import is_list_of
class MirroredProcessingCache:
def __init__(self, model_config):
self.use_cache = not model_config.disable_mm_preprocessor_cache
mm_config = model_config.multimodal_config
disable_mm_preprocessor_cache = mm_config is not None and \
not mm_config.disable_mm_preprocessor_cache
self.use_cache = not disable_mm_preprocessor_cache
self.mm_cache = ProcessingCache.get_lru_cache(VLLM_MM_INPUT_CACHE_GIB,
MultiModalKwargs)
+1 -2
View File
@@ -51,8 +51,7 @@ class Processor:
self.mm_input_cache_client = MirroredProcessingCache(self.model_config)
# Multi-modal hasher (for images)
self.use_hash = (
not self.model_config.disable_mm_preprocessor_cache) or \
self.use_hash = self.mm_input_cache_client.use_cache or \
self.cache_config.enable_prefix_caching
def _validate_logprobs(