audio: splice full transcript; reject oversized requests via context - #109
Merged
Conversation
…check (#45) The audio cascade truncated the transcript to a context-derived per-clip budget (asr_generation_reserve_tokens held back for the answer). When that reserve met or exceeded the served max_model_len, the budget floored to 1 token: the model saw no question and refused, with no error (#45). Rather than patch the truncation math, remove it. The transcript is now spliced into the prompt in full, as ordinary text tokens. A request whose prompt + transcript(s) can't leave room for the answer within max_model_len is rejected by vLLM's standard prompt-length check (HTTP 400) — the same loud failure text-only requests already get, instead of a silent 1-token transcript. This also makes audio behave identically to long text. Details: - Remove asr_generation_reserve_tokens entirely (config field + validation, compose CLI flag, processor accessor). It only existed to size the old truncation budget. - Drop the budget param / ids[:budget] truncation in the processor; splice the full transcript. - get_mm_max_tokens_per_item now reports max(1, seq_len // count) — the honest worst-case transcript positions one clip can occupy. This still sizes vLLM's encoder cache correctly (embed_multimodal emits one row per transcript token); it is a profiling hint, not a request bound. - Remove the now-dead audio_token_budget helper and its tests. Tests updated; docs/AUDIO.md rewritten to describe reject-not-truncate.
barvhaim
requested review from
antonpibm,
aviv1ron1,
freunda and
yairallouche
as code owners
July 27, 2026 11:06
aviv1ron1
pushed a commit
that referenced
this pull request
Jul 27, 2026
…check (#45) (#109) The audio cascade truncated the transcript to a context-derived per-clip budget (asr_generation_reserve_tokens held back for the answer). When that reserve met or exceeded the served max_model_len, the budget floored to 1 token: the model saw no question and refused, with no error (#45). Rather than patch the truncation math, remove it. The transcript is now spliced into the prompt in full, as ordinary text tokens. A request whose prompt + transcript(s) can't leave room for the answer within max_model_len is rejected by vLLM's standard prompt-length check (HTTP 400) — the same loud failure text-only requests already get, instead of a silent 1-token transcript. This also makes audio behave identically to long text. Details: - Remove asr_generation_reserve_tokens entirely (config field + validation, compose CLI flag, processor accessor). It only existed to size the old truncation budget. - Drop the budget param / ids[:budget] truncation in the processor; splice the full transcript. - get_mm_max_tokens_per_item now reports max(1, seq_len // count) — the honest worst-case transcript positions one clip can occupy. This still sizes vLLM's encoder cache correctly (embed_multimodal emits one row per transcript token); it is a profiling hint, not a request bound. - Remove the now-dead audio_token_budget helper and its tests. Tests updated; docs/AUDIO.md rewritten to describe reject-not-truncate. Co-authored-by: aviv ron <rona@il.ibm.com> Signed-off-by: Bar Haim <barha@il.ibm.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.
…check (#45)
The audio cascade truncated the transcript to a context-derived per-clip budget (asr_generation_reserve_tokens held back for the answer). When that reserve met or exceeded the served max_model_len, the budget floored to 1 token: the model saw no question and refused, with no error (#45).
Rather than patch the truncation math, remove it. The transcript is now spliced into the prompt in full, as ordinary text tokens. A request whose prompt + transcript(s) can't leave room for the answer within max_model_len is rejected by vLLM's standard prompt-length check (HTTP 400) — the same loud failure text-only requests already get, instead of a silent 1-token transcript. This also makes audio behave identically to long text.
Details:
Tests updated; docs/AUDIO.md rewritten to describe reject-not-truncate.