[Bugfix] fix error due to an uninitialized tokenizer when using skip_tokenizer_init with num_scheduler_steps (#9276)

Signed-off-by: changjun.lee <pord7457@gmail.com>
This commit is contained in:
changjun.lee 2025-04-27 00:51:17 +09:00 committed by GitHub
parent 52b4f4a8d7
commit 10fd1d7380
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.