[Bugfix] Disable multi-modal preprocessor cache for DP (#21896)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-08-01 08:03:56 +01:00
committed by GitHub
parent 79731a79f0
commit b4e081cb15
3 changed files with 21 additions and 2 deletions
+6
View File
@@ -871,6 +871,12 @@ class ModelConfig:
return None
def set_disable_mm_preprocessor_cache(self, value: bool) -> None:
mm_config = self.get_multimodal_config()
self.disable_mm_preprocessor_cache = value
mm_config.disable_mm_preprocessor_cache = value
def _get_encoder_config(self):
return get_sentence_transformer_tokenizer_config(
self.model, self.revision)