From 218bb8a457383e7fc31fc1ed49fea95ce8db6eb0 Mon Sep 17 00:00:00 2001 From: lujianghu Date: Mon, 3 Feb 2025 10:51:17 +0800 Subject: [PATCH] fix hit cache bug --- tllm/commons/cache.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tllm/commons/cache.py b/tllm/commons/cache.py index c2deebc..9f9c8a1 100644 --- a/tllm/commons/cache.py +++ b/tllm/commons/cache.py @@ -127,6 +127,7 @@ def build(self, seq_input: SeqInput, cache_manager: "CacheManager"): k_len_list.append(q_len) # 未命中任何 kv cache,新建 cache else: + hit_cache_len = -1 decoder_cache = None position_ids = arange_func(q_len) k_len_list.append(q_len)