[None][fix] Use compressed lengths for DeepSeek-V4 indexer#13802
Merged
lfr-0531 merged 4 commits intoMay 7, 2026
Merged
Conversation
lfr-0531
reviewed
May 6, 2026
7672e13 to
e606f5d
Compare
Collaborator
Author
|
/bot run |
lfr-0531
approved these changes
May 6, 2026
Collaborator
|
/bot run |
Collaborator
|
PR_Github #47059 [ run ] triggered by Bot. Commit: |
Collaborator
|
/bot kill |
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com>
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com>
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com>
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com>
e606f5d to
5f2f2fb
Compare
Collaborator
|
/bot run |
Collaborator
|
PR_Github #47093 [ run ] triggered by Bot. Commit: |
Collaborator
|
PR_Github #47093 [ run ] completed with state |
lfr-0531
pushed a commit
that referenced
this pull request
May 7, 2026
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com> Co-authored-by: Mingyang Hao <mingyangHao@users.noreply.github.com> (cherry picked from commit 7c83907) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com>
lfr-0531
pushed a commit
that referenced
this pull request
May 14, 2026
Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com> Co-authored-by: Mingyang Hao <mingyangHao@users.noreply.github.com> (cherry picked from commit 7c83907) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com>
lfr-0531
pushed a commit
to lfr-0531/TensorRT-LLM
that referenced
this pull request
May 29, 2026
) Signed-off-by: Mingyang Hao <mingyangHao@users.noreply.github.com> Co-authored-by: Mingyang Hao <mingyangHao@users.noreply.github.com> (cherry picked from commit 7c83907) Signed-off-by: yuhangh <58161490+heyuhhh@users.noreply.github.com> Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.com> (cherry picked from commit 4a42788) Signed-off-by: Fanrong Li <lfr-0531@users.noreply.github.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.
@coderabbitai summary
Description
Fix DeepSeek-V4 DSA indexer metadata handling for compressed KV cache.
This PR updates the indexer compression-ratio handling so both
0and1are treated as disabled compression, matching model configs where0means nocompressor. For compressed paths, indexer KV lengths and max sequence length remain in compressed KV-token space.
It also avoids recomputing
get_indexer_kv_lens()in the decode forward path by reusing the generation indexer KV lengths prepared together with schedulermetadata. This prevents introducing an extra element-wise CUDA division kernel in the hot path.
Test Coverage
pre-commit run --show-diff-on-failure --files tensorrt_llm/_torch/attention_backend/sparse/dsa.py tests/unittest/_torch/attention/sparse/dsa/ test_dsa_indexer.pytest_indexer_compress_ratio_zero_or_one_means_uncompressedtest_indexer_decode_with_paged_kv_cacheGitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.