Repository navigation
[XPU][Bugfix] Fix Qwen2-Audio ValueError on audio clips longer than 30s - #56912
Merged
jikunshang merged 4 commits intoSep 16, 2026
Merged
Conversation
jbyczkow
force-pushed
the
fix/qwen2-audio-truncation-leak
branch
from
September 15, 2026 09:27
c6dc5e7 to
fa4c817
Compare
call_hf_processor() sets merged_kwargs.setdefault("truncation", False)
so the dummy placeholder text passed to the HF processor is not cut
short (vLLM needs the full untruncated placeholder sequence to keep
multi-modal token positions aligned with the audio embeddings).
Qwen2AudioProcessor forwards that same truncation kwarg unmodified to
its Whisper-style feature extractor, whose own default is
truncation=True: it truncates/pads every audio clip to the model's
fixed 30s window (3000 mel frames). With truncation=False leaking in,
clips longer than 30s are no longer truncated, so their extracted
input_features keep their native (larger) frame count. This later
fails Qwen2AudioFeatureInputs' fixed-shape validation:
ValueError: input_features dim[2] expected 3000, got 3495
Qwen2AudioMultiModalProcessor._preprocess_hf_mm_data() now explicitly
sets truncation=True in the kwargs it returns, so it wins over
call_hf_processor()'s setdefault(). The dummy text truncation this was
originally protecting against is unaffected here since it's tiny
(<audio_bos><audio_token><audio_eos>) and never actually gets
truncated either way.
First introduced by 0b19ebc
("[MM] Simplify _apply_hf_processor_main (vllm-project#53275)"), which added the
truncation=False default in call_hf_processor().
Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jbyczkow
force-pushed
the
fix/qwen2-audio-truncation-leak
branch
from
September 15, 2026 20:30
fa4c817 to
6a64ecc
Compare
jikunshang
reviewed
Sep 16, 2026
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
jikunshang
approved these changes
Sep 16, 2026
Member
|
/ci run |
|
❌ This PR is 10 commits behind upstream |
Member
|
/ci run |
|
✅ Triggered Buildkite CI #89238 for commit |
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
…0s (vllm-project#56912) Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Bugfix] Fix Qwen2-Audio ValueError on audio clips longer than 30s
Purpose
InputProcessingContext.call_hf_processor()setsmerged_kwargs.setdefault("truncation", False)so the dummy placeholdertext passed to the HF processor isn't cut short — vLLM needs the full
untruncated placeholder sequence to keep multi-modal token positions
aligned with the audio embeddings.
Qwen2AudioProcessorforwards that sametruncationkwarg unmodified toits Whisper-style feature extractor, whose own default is
truncation=True: it truncates/pads every audio clip to the model'sfixed 30s window (3000 mel frames). With
truncation=Falseleaking infrom the text-side default, clips longer than 30s are no longer
truncated, so their extracted
input_featureskeep their native (larger)frame count. This later fails
Qwen2AudioFeatureInputs' fixed-shapevalidation:
which crashes the engine core and takes the whole server down
(
EngineDeadError).First introduced by 0b19ebc
("[MM] Simplify
_apply_hf_processor_main(#53275)"), which added thetruncation=Falsedefault incall_hf_processor(). Not--enforce-eager-specific — reproduces on both eager andtorch.compilepaths, since the bug is in multi-modal preprocessing,before model execution.
Fix
Qwen2AudioMultiModalProcessor._preprocess_hf_mm_data()now explicitlysets
truncation=Truein the kwargs it returns, so it wins overcall_hf_processor()'ssetdefault(). The dummy-text truncation thisdefault was originally protecting against is unaffected here — the
dummy text is tiny (
<audio_bos><audio_token><audio_eos>) and neveractually gets truncated either way.
Test Plan
Client (any audio clip longer than 30s triggers it; the snippet below
synthesizes one so it's fully reproducible without external data):
Test Result
Before fix: server crashes on the first request with a >30s audio clip:
All subsequent requests get
500 Internal Server Error, server has tobe restarted.
After fix: server processes the same request successfully, returns a
transcription with
200 OK. Confirmed on Intel BMG B70 (XPU) and NVIDIA A100-SXM4-80GB (CUDA).