From 23b899a8e62c7ea07981bf8487b0dc2cb17847b8 Mon Sep 17 00:00:00 2001 From: Aurick Qiao Date: Tue, 22 Oct 2024 18:38:12 -0400 Subject: [PATCH] [Bugfix] fix detokenizer shallow copy (#5919) --- vllm/transformers_utils/detokenizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/transformers_utils/detokenizer.py b/vllm/transformers_utils/detokenizer.py index 345ea14f9f273..7c8423d2b0a34 100644 --- a/vllm/transformers_utils/detokenizer.py +++ b/vllm/transformers_utils/detokenizer.py @@ -90,7 +90,7 @@ def decode_prompt_logprobs_inplace(self, seq_group: SequenceGroup, prefix_offset = next_iter_prefix_offset read_offset = next_iter_read_offset if prev_tokens is None: - prev_tokens = next_iter_tokens + prev_tokens = next_iter_tokens.copy() else: prev_tokens.extend(next_iter_tokens)