Repository navigation
Commit 4b22bc7
committed
[None][fix] Size the cross-attention KV cache from the encoder's declared length, not max_input_len
For encoder-decoder models the cross KV pool was sized from llm_args.max_input_len
(default 1024), which overwrote the engine length unconditionally; the config-derived
encoder limit was then applied with min() and could only shrink it further. Whisper's
encoder emits max_source_positions=1500 frames, so every request failed in
prepare_cross_metadata with "max KV cache length of input sequences (1500) exceeds the
KV cache manager's maximum supported length (1024)".
Treat the encoder's declared position limit (now including max_source_positions) as
authoritative for the cross pool and fall back to max_input_len only when the model
declares no encoder length.
Fixes #19514.
Verified on RTX 5070 Ti (sm_120) with openai/whisper-large-v3 (release 1.3.0rc25 +
#19450): the default-argument reproduction from #18609 transcribes.1 parent 129655f commit 4b22bc7
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2210 | 2210 | | |
2211 | 2211 | | |
2212 | 2212 | | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | 2213 | | |
2217 | 2214 | | |
2218 | 2215 | | |
2219 | 2216 | | |
2220 | | - | |
2221 | | - | |
| 2217 | + | |
| 2218 | + | |
2222 | 2219 | | |
2223 | 2220 | | |
2224 | | - | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
2225 | 2233 | | |
2226 | 2234 | | |
2227 | 2235 | | |
| |||
0 commit comments