Skip to content

Fix decode budget scaling - #165

Merged
cjpais merged 6 commits into
mainfrom
fix/decode-budget-scaling
Sep 21, 2026
Merged

cjpais merged 6 commits into
mainfrom
fix/decode-budget-scaling

Conversation

@cjpais

@cjpais cjpais commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Successor to #74 and #106

Should resolve #95 as well as some handy issues like #2087

In essence, previously we had some hard-coded constants which would truncate the output on some models, even if it could decode more. And this was basically an internal implementation trying to avoid degenerate decode loops, but we're going to fix that separately

@cjpais
cjpais merged commit ed3468f into main Sep 21, 2026
25 checks passed
cunba-ai pushed a commit to cunba-ai/transcribe.cpp that referenced this pull request Sep 21, 2026
Fix decode budget scaling (handy-computer#165).

Conflict resolution in src/arch/qwen3_asr/model.cpp: our k_max_new=512
bump (be1f74f) is superseded by upstream's scaled decode budget —
k_gen_reserve=256 acts as the input-gate reserve and decode-budget
floor, and the actual budget is picked per run from the predicted
transcript length (12 tokens/sec) clamped to the context ceiling.
Took the upstream side verbatim.
NairoDorian added a commit to NairoDorian/transcribe.cpp that referenced this pull request Sep 22, 2026
…nto fork

Scale the per-run decode budget with audio length via shared transcribe-decode-budget.h instead of a fixed 256/512-token cap, so long clips stop truncating with context to spare. Short clips keep the family floor (behavior unchanged).

qwen3_asr conflicts resolved manually: offline run() passes max_new_tokens=0 to size the budget from audio (gate still k_gen_reserve=256, same as before); R2T2 streaming keeps its absolute 32-token per-tick budget and KV sizing unchanged. Kept both test blocks in tests/CMakeLists.txt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qwen3 asr max_new and k_max_new

1 participant