mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00
[Optimize] optimize prefix cache in release22 (#3889)
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
Some checks failed
CE Compile Job / ce_job_pre_check (push) Has been cancelled
CE Compile Job / print_ce_job_pre_check_outputs (push) Has been cancelled
CE Compile Job / FD-Clone-Linux (push) Has been cancelled
CE Compile Job / Show Code Archive Output (push) Has been cancelled
CE Compile Job / BUILD_SM8090 (push) Has been cancelled
CE Compile Job / BUILD_SM8689 (push) Has been cancelled
CE Compile Job / CE_UPLOAD (push) Has been cancelled
* optimize prefix cache in release22 * optimize prefix cache in release22 * fix worker * fix * fix --------- Co-authored-by: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com>
This commit is contained in:
@@ -1347,6 +1347,7 @@ class GPUModelRunner(ModelRunnerBase):
|
||||
if (
|
||||
not self.cache_config.enable_chunked_prefill
|
||||
or self.guided_backend is None
|
||||
or model_forward_batch is None
|
||||
or envs.ENABLE_V1_KVCACHE_SCHEDULER
|
||||
):
|
||||
return skip_idx_list
|
||||
@@ -1549,7 +1550,7 @@ class GPUModelRunner(ModelRunnerBase):
|
||||
"""
|
||||
Add cache for guided decoding.
|
||||
"""
|
||||
if self.guided_backend is None:
|
||||
if self.guided_backend is None or model_forward_batch is None:
|
||||
return
|
||||
|
||||
for request in model_forward_batch:
|
||||
|
Reference in New Issue
Block a user