Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion fastdeploy/output/token_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,9 @@ def _process_batch_output(self):
and self.cfg.cache_config.enable_prefix_caching
and self.cfg.cache_config.enable_output_caching
):
if (task.num_total_tokens - 1) % self.cfg.cache_config.block_size == 0:
if (task.num_total_tokens - 1) % self.cfg.cache_config.block_size == 0 and (
task_id not in self.resource_manager.to_be_rescheduled_request_id_set
):
self.resource_manager.cache_output_tokens(
task
) # when enable prefix caching, cache kv cache for output tokens
Expand Down
Loading