[Bug]: Whisper (PyTorch backend) fails on any repeated request when KV block reuse is on: "Request requires multimodal_embed_mask_cumsum for chunked prefill or KV-cache reuse"
System Info
x86 5070ti
Who can help?
Follow-up to #18609 / #19450. With the #19450 guard applied (built from v1.3.0rc25) and
enable_block_reuse left at its default (True), the first Whisper request transcribes, but the
second request that shares a prompt prefix with an earlier one (e.g. a warm-up followed by real
traffic, or any two clips with the same decoder prompt) fails:
ValueError: Request requires multimodal_embed_mask_cumsum for chunked prefill or KV-cache reuse (begin_compute=3, end_compute=4, prompt_len=4) but py_multimodal_data has keys {'mm_bidirectional_blocks', 'audio'} with no cumsum. The input processor may be missing a discriminator (override get_mm_token_ids or ensure get_vocab_size resolves).
File ".../tensorrt_llm/_torch/pyexecutor/model_engine.py", line 5300, in _prepare_tp_inputs
File ".../tensorrt_llm/inputs/multimodal.py", line 1144, in check_mm_embed_cumsum_if_needed
Environment
RTX 5070 Ti (sm_120), nvcr.io/nvidia/tensorrt-llm/release:1.3.0rc25 + #19450 (capacityScheduler.cpp hunk)
- the cross-KV sizing fix from the sibling issue,
openai/whisper-large-v3, LLM API directly.
Reproduction
Same script as #18609 with max_input_len=1500, enable_block_reuse=True (default), and the
llm.generate(...) call executed twice in the same process on the same 30 s clip. Run 1 succeeds,
run 2 raises the error above.
Expected
Either the Whisper input processor provides the multimodal discriminator (get_mm_token_ids) so the
reuse path can compute the cumsum, or KV-cache reuse is disabled automatically for features-based
encoders. With KvCacheConfig(enable_block_reuse=False, ...) everything is stable across repeated
requests (0.34 s per 30 s clip warm, fp16).
Information
- [ ] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
.
Expected behavior
.
actual behavior
.
additional notes
.
Before submitting a new issue...
- [x] Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.
#19302 appears to have resolved the issue. I’m closing this issue, but please don’t hesitate to open a new one if the problem persists in the latest release. Thanks!