[Refactor][Model Runner V2][Multimodal] Move the encoder-only path out of the shared runner (#53176)

Signed-off-by: Tianyu Guo <guoty@inferact.ai>
This commit is contained in:
Tianyu Guo
2026-08-22 05:11:44 +00:00
committed by GitHub
parent e9d1398d9e
commit 7ca49fbe4b
7 changed files with 169 additions and 42 deletions
+11 -1
View File
@@ -572,7 +572,7 @@ class VllmConfig:
)
@property
def is_encoder_only(self) -> bool:
def is_mm_encoder_only(self) -> bool:
mm_config = (
self.model_config.multimodal_config
if self.model_config is not None
@@ -1782,6 +1782,16 @@ class VllmConfig:
# before the HMA check below, which inspects the connector class.
self._post_init_kv_transfer_config()
if self.is_mm_encoder_only and self.cache_config.enable_prefix_caching:
# Such an instance publishes encoder embeddings and runs no language
# model, so it holds no KV cache for prefix caching to reuse and its
# coordinator would have no group to manage.
logger.info(
"Disabling prefix caching: this instance runs the "
"multi-modal encoder only."
)
self.cache_config.enable_prefix_caching = False
# Hybrid KV cache manager (HMA) runtime rules:
# - Explicit enable (--no-disable-kv-cache-manager): error if runtime
# disables it