From 69196a9bc7aefcd132c68a2184f1092ee3377ba9 Mon Sep 17 00:00:00 2001 From: Aleksandr Malyshev <164964928+maleksan85@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:30:46 -0800 Subject: [PATCH] [BUGFIX] When skip_tokenize_init and multistep are set, execution crashes (#12277) Signed-off-by: maleksan85 Co-authored-by: maleksan85 --- vllm/engine/output_processor/multi_step.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm/engine/output_processor/multi_step.py b/vllm/engine/output_processor/multi_step.py index c8b282b1a7676..99c2baf3f4df4 100644 --- a/vllm/engine/output_processor/multi_step.py +++ b/vllm/engine/output_processor/multi_step.py @@ -144,7 +144,7 @@ class MultiStepOutputProcessor(SequenceGroupOutputProcessor): def _process_decode_and_stop(self, seq: Sequence, sampling_params: SamplingParams) -> None: new_char_count = 0 - if sampling_params.detokenize: + if sampling_params.detokenize and self.detokenizer: new_char_count = self.detokenizer.decode_sequence_inplace( seq, sampling_params)