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 8, 17:45 UTC
[Bugfix] Fix Whisper tokenization (#34011)
Signed-off-by: NickLucche <nlucches@redhat.com>
Nicolò Lucchesi committed
Feb 7, 2026 at 03:42 UTC
55aeec04f52a9d347c3299c4f4d0df2683ffac00
1 file changed
+8
vllm/model_executor/models/whisper.py
+8
@@ -727,6 +727,14 @@ class WhisperMultiModalProcessor(EncDecMultiModalProcessor[WhisperProcessingInfo
727
**mm_kwargs,
728
sampling_rate=feature_extractor.sampling_rate,
729
)
730
+ # The HF WhisperProcessor passes **kwargs to both the tokenizer
731
+ # and the feature extractor. Text-tokenizer kwargs like
732
+ # `truncation` and `max_length` must be removed when audio data
733
+ # is present, otherwise the feature extractor interprets
734
+ # `max_length` as raw audio samples and truncates the audio.
735
+ tok_kwargs = {
736
+ k: v for k, v in tok_kwargs.items() if k not in ("truncation", "max_length")
737
+ }
738
processed_outputs = super()._call_hf_processor(
739
prompt=prompt,
740
mm_data=mm_data,