A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 11, 23:45 UTC
[Enc-Dec] Fix OOT tokenizer issue (#30144)
Signed-off-by: NickLucche <nlucches@redhat.com>
Nicolò Lucchesi committed
Dec 5, 2025 at 20:23 UTC
bff78310d979bf516b45d8908b5e621a170578b9
1 file changed
+4
-3
vllm/inputs/preprocess.py
+4
-3
@@ -198,7 +198,7 @@ class InputPreprocessor:
198
) -> dict[str, Any]:
199
kwargs = dict[str, Any]()
200
201
- if self.model_config.hf_config.model_type == "whisper":
201
+ if self.model_config.is_encoder_decoder:
202
# For Whisper, special tokens should be provided by the user based
203
# on the task and language of their request. Also needed to avoid
204
# appending an EOS token to the prompt which disrupts generation.
@@ -573,7 +573,6 @@ class InputPreprocessor:
573
"""
574
encoder_inputs: SingletonInputs
575
decoder_inputs: SingletonInputs | None
576
-
576
if is_explicit_encoder_decoder_prompt(prompt):
577
# `cast` is needed for mypy, but not pyright
578
prompt_ = cast(ExplicitEncoderDecoderPrompt, prompt)
@@ -585,7 +584,9 @@ class InputPreprocessor:
584
if (decoder_input := prompt_["decoder_prompt"]) is None:
585
decoder_inputs = None
586
else:
588
- decoder_inputs = self._prompt_to_llm_inputs(decoder_input)
587
+ decoder_inputs = self._prompt_to_llm_inputs(
588
+ decoder_input, tokenization_kwargs=tokenization_kwargs
589
+ )
590
# For multimodal model, override decoder prompt from processor
591
# with explicit decoder prompt.
592
if self.model_config.is_multimodal_model: