Repository navigation
[Security] Size Whisper audio dummies from processor chunk_length - #56979
jperezdealgaba wants to merge 4 commits into
Conversation
Profiling and token budgets used a 30-second cap while some processors declare a longer chunk, so valid audio could exceed the profiled encoder budget. Co-authored-by: Cursor Agent Signed-off-by: Juan Pérez de Algaba <jperezde@redhat.com>
|
Could you run the startup e2e to confirm there are no significant regressions in terms of startup time and memory usage? |
|
/ci run |
|
❌ This PR is 16 commits behind upstream |
|
/ci run |
|
❌ This PR is 1 commit behind upstream |
|
/ci run |
|
✅ Triggered Buildkite CI #89115 for commit |
|
/ci run |
|
✅ Triggered Buildkite CI #89305 for commit |
Summary
Whisper-style audio dummy inputs and Qwen2-Audio token budgets were sized with a hardcoded 30-second cap even when the processor declared a longer
chunk_length. Valid audio at that declared maximum therefore produced more encoder tokens than profiling reserved. This change sizes dummy waveforms and the shared audio token estimate from the processorchunk_lengthso the profiled budget covers the inputs the model actually accepts.Changes
vllm/model_executor/models/qwen2_audio.py:get_mm_max_tokens_per_itemuses the processorchunk_lengthinstead ofmin(chunk_length, 30).vllm/model_executor/models/qwen2_5_omni_thinker.py: Omni dummy audio (also used by Qwen3-Omni) uses the same processor duration.vllm/model_executor/models/kimi_audio.py: Kimi-Audio dummy audio uses the processor duration.vllm/model_executor/models/qwen3_asr.py: Qwen3-ASR dummy audio uses the processor duration.tests/models/multimodal/processing/test_whisper_audio_dummy.py: regression coverage for the token estimate and dummy lengths.Codepath coverage
Qwen2AudioProcessingInfo.get_mm_max_tokens_per_item.chunk_length; only the token estimate was capped.Duplicate-work check
Searched open and merged PRs for
qwen2_audio.py,qwen2_5_omni_thinker.py,kimi_audio.py,target_audio_length, and dummychunk_length. No open PR removes the 30-second cap. Merged #35994 added an audio token estimate for Omni but kept the 30-second clamp, which is the remaining mismatch.Tests
test_qwen2_audio_max_tokens_uses_processor_chunk_length— 300 s processor budget is 7500 tokens, not the 30 s value.test_qwen2_audio_max_tokens_matches_thirty_second_processor— 30 s processors still estimate 750 tokens.test_qwen2_audio_dummy_uses_processor_chunk_lengthtest_qwen2_5_omni_dummy_uses_processor_chunk_lengthtest_qwen3_omni_dummy_builder_is_qwen2_5_omni_buildertest_kimi_audio_dummy_uses_processor_chunk_lengthtest_qwen3_asr_dummy_uses_processor_chunk_lengthCommands:
Results: 7 passed; pre-commit hooks passed.
AI assistance
This PR was developed with AI assistance.
Made with Cursor