From 03686c57bed96547576cc4e0189b094573627d50 Mon Sep 17 00:00:00 2001 From: Chen Zhang Date: Thu, 30 Jan 2025 21:53:04 -0800 Subject: [PATCH] small fix Signed-off-by: Chen Zhang --- vllm/v1/core/kv_cache_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vllm/v1/core/kv_cache_utils.py b/vllm/v1/core/kv_cache_utils.py index 12d6681ea6535..2b6557ad3ce66 100644 --- a/vllm/v1/core/kv_cache_utils.py +++ b/vllm/v1/core/kv_cache_utils.py @@ -262,9 +262,10 @@ def hash_block_tokens( The hash value of the block and the token ids in the block. The entire tuple is used as the hash key of the block. """ + curr_block_token_ids_tuple = tuple(curr_block_token_ids) return BlockHashType( - hash((parent_block_hash, tuple(curr_block_token_ids), extra_keys)), - tuple(curr_block_token_ids), extra_keys) + hash((parent_block_hash, curr_block_token_ids_tuple, extra_keys)), + curr_block_token_ids_tuple, extra_keys) def hash_request_tokens(block_size: int,