From 10fd1d7380a42950822447cb9326c3550773b358 Mon Sep 17 00:00:00 2001 From: "changjun.lee" Date: Sun, 27 Apr 2025 00:51:17 +0900 Subject: [PATCH] [Bugfix] fix error due to an uninitialized tokenizer when using `skip_tokenizer_init` with `num_scheduler_steps` (#9276) Signed-off-by: changjun.lee --- 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 5f126c7571dc8..126e7da702160 100644 --- a/vllm/engine/output_processor/multi_step.py +++ b/vllm/engine/output_processor/multi_step.py @@ -178,7 +178,7 @@ class MultiStepOutputProcessor(SequenceGroupOutputProcessor): # generates a fixed number of tokens without evaluating stopping # conditions within the block. This can cause an eos token to be # unintentionally ignored. - if not sampling_params.ignore_eos: + if not sampling_params.ignore_eos and self.detokenizer: eos_token_id = self.get_tokenizer_for_seq(seq).eos_token_id # Avoiding .index calls as exception throwing in the happy path # is expensive.