[https://nvbugs/6240420][fix] Clamp KV pool window sizes to max_seq_len - #14905
Conversation
|
/bot run --disable-fail-fast |
📝 WalkthroughWalkthrough
ChangesPool window configuration consistency
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
|
PR_Github #51828 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
|
PR_Github #51831 [ run ] triggered by Bot. Commit: |
KVCacheManager.__init__ resolved max_attention_window_vec with each window clamped to min(w, max_seq_len), but left pool_configurations window keys unclamped. _build_layer_to_pool_idx then keyed the window->pool map by the raw pool windows while looking up the clamped per-layer windows, raising KeyError when sliding_window > max_seq_len. This surfaced on the AutoDeploy registry accuracy test for mistralai/Ministral-8B-Instruct-2410 (sliding_window=32768) run with the dashboard default max_seq_len=512: the single pool was keyed 32768 while every layer resolved to a clamped window of 512, giving KeyError(512). Clamp the pool windows to the same max_seq_len bound inside _resolve_max_attention_window_vec so the pool window keys stay consistent with the returned vector. A window larger than max_seq_len can never slide, so it is functionally a full-attention pool of max_seq_len. Re-enable the Ministral registry accuracy test that this fixes. Signed-off-by: Yueh-Ting Chen <yuehtingc@nvidia.com>
|
PR_Github #51828 [ run ] completed with state |
|
/bot run --disable-fail-fast |
|
PR_Github #51833 [ run ] triggered by Bot. Commit: |
|
PR_Github #51831 [ run ] completed with state |
|
/bot run --extra-stage "DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1" |
|
PR_Github #51840 [ run ] triggered by Bot. Commit: |
|
PR_Github #51833 [ run ] completed with state |
|
PR_Github #51840 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1" --disable-fail-fast |
|
PR_Github #51851 [ run ] triggered by Bot. Commit: |
|
PR_Github #51851 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1" --disable-fail-fast |
|
DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1 passed in #14905 (comment) |
|
PR_Github #51893 [ run ] triggered by Bot. Commit: |
|
PR_Github #51893 [ run ] completed with state
|
|
/bot run --extra-stage "DGX_H100-4_GPUs-AutoDeploy-Post-Merge-1" --disable-fail-fast |
|
PR_Github #52196 [ run ] triggered by Bot. Commit: |
|
PR_Github #52196 [ run ] completed with state |
|
/bot skip --comment "CI passed. The latest commit is merge from origin/main to resolve conflict under waive.txt" |
|
PR_Github #52211 [ skip ] triggered by Bot. Commit: |
|
PR_Github #52211 [ skip ] completed with state |
…en (NVIDIA#14905) Signed-off-by: Yueh-Ting Chen <yuehtingc@nvidia.com> Signed-off-by: NVFB <186336021+NVFB@users.noreply.github.com>
…en (NVIDIA#14905) Signed-off-by: Yueh-Ting Chen <yuehtingc@nvidia.com>
Description
KVCacheManager.__init__clamps each entry ofmax_attention_window_vectomin(w, max_seq_len)but left thepool_configurationswindow keys unclamped._build_layer_to_pool_idxthen keyed the window→pool map by the raw pool windows while looking up the clamped per-layer windows, raisingKeyErrorwheneversliding_window > max_seq_len.Seen on the AutoDeploy registry accuracy test for
mistralai/Ministral-8B-Instruct-2410(sliding_window=32768) run with the dashboard defaultmax_seq_len=512: the single pool was keyed32768while every layer resolved to a clamped window of512, givingKeyError(512).Fix: clamp the pool windows to the same
max_seq_lenbound inside_resolve_max_attention_window_vec, keeping pool window keys consistent with the resolved vector. A window larger thanmax_seq_lencan never slide, so it is functionally a full-attention pool ofmax_seq_len.Test Coverage
test_autodeploy_from_registry[mistralai_Ministral-8B-Instruct-2410-False]passes locally with the patch.