Skip to content

Commit 9566ae8

Browse files
ApplEOFDiscordzjjliveinJiang-Jia-JunEmmonsCurse
authored
[Bug Fix] disable prefix caching in mm model (#4167)
* add http get retry * fix coments * disable prefix caching in mm model * fix unit test --------- Co-authored-by: zhangjunjun04 <zhangjunjun04@baidu.com> Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com> Co-authored-by: YuBaoku <49938469+EmmonsCurse@users.noreply.github.com>
1 parent e8318b7 commit 9566ae8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fastdeploy/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,8 @@ def postprocess(self):
15401540

15411541
self.cache_config.postprocess(self.scheduler_config.max_num_batched_tokens, self.scheduler_config.max_num_seqs)
15421542
self.cache_config.max_block_num_per_seq = int(self.max_model_len // self.cache_config.block_size)
1543+
if self.model_config is not None and self.model_config.enable_mm:
1544+
self.cache_config.enable_prefix_caching = False
15431545

15441546
if self.guided_decoding_backend == "auto":
15451547
if current_platform.is_xpu() or self.speculative_config.method is not None:

fastdeploy/engine/args_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,6 @@ def __post_init__(self):
409409
self.enable_prefix_caching = False
410410
if self.speculative_config is not None:
411411
self.enable_prefix_caching = False
412-
if self.enable_mm:
413-
self.enable_prefix_caching = False
414412
if not current_platform.is_cuda():
415413
self.enable_prefix_caching = False
416414
if self.dynamic_load_weight:

0 commit comments

Comments
 (0)