[TRTLLM-11875][feat] Support fine-grained context chunk management#16427
[TRTLLM-11875][feat] Support fine-grained context chunk management#16427VALLIS-NERIA wants to merge 12 commits into
Conversation
|
/bot run |
|
PR_Github #59453 [ run ] triggered by Bot. Commit: |
|
PR_Github #59453 [ run ] completed with state
|
VALLIS-NERIA
left a comment
There was a problem hiding this comment.
Author notes explaining the purpose and scope of each production change block and its focused regression coverage.
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
7014727 to
5a5b53d
Compare
|
/bot run |
|
PR_Github #59667 [ run ] triggered by Bot. Commit: |
|
PR_Github #59667 [ run ] completed with state
|
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
|
PR_Github #59725 [ run ] triggered by Bot. Commit: |
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
|
/bot run |
|
PR_Github #59738 [ run ] triggered by Bot. Commit: |
|
PR_Github #59725 [ run ] completed with state |
|
PR_Github #59738 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59811 [ run ] triggered by Bot. Commit: |
|
PR_Github #59811 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59823 [ run ] triggered by Bot. Commit: |
|
PR_Github #59823 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59850 [ run ] triggered by Bot. Commit: |
|
PR_Github #59850 [ run ] completed with state
|
|
/bot run |
|
PR_Github #59883 [ run ] triggered by Bot. Commit: |
BowenFu
left a comment
There was a problem hiding this comment.
LGTM — the fine-grained context-chunk changes preserve the existing default scheduling path: the FORCE_CHUNK capacity-overflow now rounds down to a unit boundary (equivalent to the prior zeroing since chunkSize <= unit), and the mamba snapshot-range addition is a no-op boundary for existing configs. Core scheduler change, but existing behavior is unchanged.
|
PR_Github #59883 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #59897 [ run ] triggered by Bot. Commit: |
|
PR_Github #59897 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #59966 [ run ] triggered by Bot. Commit: |
|
PR_Github #59966 [ run ] completed with state |
Summary by CodeRabbit
New Features
Bug Fixes
Description
This PR has two goals:
expect_snapshot_pointsas the manager-to-scheduler contract and move the existing C++ Mamba interval-reuse chunking onto that contract.Snapshot-aware context chunking
expect_snapshot_pointson the C++ request object and expose it through nanobind, so the C++ and Python schedulers share the same per-request field.CppMambaHybridCacheManagerpublish regularstates_snapshot_intervalboundaries before scheduling when block reuse is enabled. Prompt end remains the implicit final boundary.MicroBatchScheduler, PythonPyMicroBatchScheduler, andKVCacheV2Schedulerhonor these absolute boundaries underFORCE_CHUNK.KV-cache fixes
max_tokens_in_bufferonly after the effectivetokens_per_blockis known, including the FlashMLA override, and round it up to a block boundary.RankInfo, because layer 0 may be a linear-attention layer with no KV heads.MixedMambaHybridCacheManagerwith a non-Python transceiver runtime, since its separately managed attention-KV and Mamba-state pools require the Python routing path.This PR does not add the V2 Mamba cache manager, save-last reuse, or V2 Mamba disaggregated transfer.
Test Coverage
ForceChunkTest.*: 15 passedTestForceChunkPolicy: 14 passedRankInfo, and runtime-guard tests: 13 passedPR Checklist