[https://nvbugs/6223556][fix] Correct cached_tokens accounting in dis-agg gen-first overlap path - #14910
[https://nvbugs/6223556][fix] Correct cached_tokens accounting in dis-agg gen-first overlap path#14910tensorrt-cicd wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThis PR modifies the generation-first disaggregation service to correctly adjust usage accounting by rewriting generation response usage from the context response, updates two test configuration files to enable cache reuse features (block and partial reuse), and removes two test waivers to enable previously skipped overlap tests. ChangesDisaggregated generation-first flow improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 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)
Comment |
…ting In generation-first disaggregated scheduling the context and generation requests run concurrently, so the context worker's usage cannot be propagated to the generation worker through the request (as done in the context-first path). The generation worker then reports the entire transferred prompt as cached, over-reporting cached_tokens. Adopt the context worker's usage on the final response, mirroring the context-first propagation. Also enable KV block reuse in the overlap_gen_first test configs so the cache-reuse usage check is meaningful, and remove the related waivers. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
38c081a to
953ffd2
Compare
|
/bot run --add-multi-gpu-test --disable-fail-fast |
|
PR_Github #53292 [ run ] triggered by Bot. Commit: |
|
PR_Github #53292 [ run ] completed with state
|
|
This is a false fix. See #15246 |
Summary
cached_tokensas the full prompt length (17) instead of the actual reused KV blocks (prompt_tokens-1 = 16). This causedtest_disaggregated_overlap_gen_firstto fail its cache-reuse usage check.rewrite_usage_response_from_ctx, mirroring the context-first behavior. The test configs were also updated to enable block reuse and partial reuse so the reuse path is exercised, and the corresponding waives were removed since the test now passes.Test plan
Links
Summary by CodeRabbit
Bug Fixes
Tests