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)