[BUGFIX] When skip_tokenize_init and multistep are set, execution crashes (#12277)

Signed-off-by: maleksan85 <maleksan@amd.com>
Co-authored-by: maleksan85 <maleksan@amd.com>
This commit is contained in:
Aleksandr Malyshev
2025-01-21 15:30:46 -08:00
committed by GitHub
parent 2acba47d9b
commit 69196a9bc7

View File

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