Skip to content

Commit

Permalink
disable prefix-caching for vl model (#2825)
Browse files Browse the repository at this point in the history
  • Loading branch information
grimoire authored Nov 27, 2024
1 parent b5b3179 commit 3913ead
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lmdeploy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ def pipeline(model_path: str,
if backend_config is not None else None
model_path = get_model(model_path, download_dir, revision)

_, pipeline_class = get_task(model_path)
task, pipeline_class = get_task(model_path)
if task == 'vlm':
if backend_config.enable_prefix_caching:
backend_config.enable_prefix_caching = False
logger.warning('VLM does not support prefix caching.')

if type(backend_config) is not PytorchEngineConfig:
# set auto backend mode
Expand Down

0 comments on commit 3913ead

Please sign in to comment.