[Bugfix] Fix pooled Whisper encoder sliding-window kernel size (#47437)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-07-02 10:19:11 -07:00
committed by GitHub
parent 320ee285c9
commit 443e68cfa6
2 changed files with 27 additions and 13 deletions
@@ -78,7 +78,9 @@ def assert_encoder_kv_cache_spec(engine: LLM) -> None:
assert isinstance(spec, SlidingWindowSpec)
assert spec.block_size == 16
assert spec.num_kv_heads == 128
assert spec.sliding_window == cdiv(750, 4) == 188
# cdiv(750, 4) == 188 pooled tokens cover the model's window; the extra
# +1 is an eviction margin (see whisper_causal.py get_kv_cache_spec).
assert spec.sliding_window == cdiv(750, 4) + 1 == 189
assert (
spec.max_admission_blocks_per_request(
max_num_batched_tokens=1,