Repository navigation
[None][fix] Keep the standalone drafter's pool unpaired on disagg workers that ship its window - #24
Draft
zheyuf wants to merge 2 commits into
Conversation
…kers that ship its window NVIDIA#22 pairs the standalone DSpark drafter's pool with the target's block reuse whenever the two page sizes match. A disaggregated worker of a model that opts into the draft-window transfer (RuntimeHooks.disagg_draft_kv: the sm_107 MiniMax-M3.1 targets) ships an unpaired pool only, so with block reuse on, select_disagg_draft_kv_cache_manager refused the paired pool at executor creation and the worker failed to start. KvCacheCreator._joint_reuse_supported now declines the pairing for a disaggregated worker that ships the window, using the selector's own opt-in predicate (model_ships_disagg_draft_window). Aggregated serving keeps the pairing on every GPU; the kill switch TRTLLM_M31_DISABLE_DISAGG_DRAFT_KV=1 keeps it on disagg workers too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Zheyu Fu <zheyuf@nvidia.com>
…e drafter window The target's 128-token draft pages (NVIDIA#22) serve only the pairing with the target's block reuse. A disaggregated worker that ships the drafter window keeps its pool unpaired, and there a prefix hit's first stored position is rounded up to a draft page (DFlashWorker._ctx_base_for_store): a 128-token page hides up to 127 tokens of the tail from the drafter, a 64-token page up to 63. On Rubin 1P1D disagg (K7 block, 96% prefix hits) the 128-token unpaired pool lost ~0.16 AL against the 64-token one, so such a worker now keeps the static page size, as before NVIDIA#22. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Zheyu Fu <zheyuf@nvidia.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.
Description
Alternative to #23.
Bug. #22 pairs the standalone DSpark drafter's pool with the target's block reuse whenever the two page sizes match. On SM107 the drafter now takes the target's 128-token pages, so with block reuse on, the two pools are paired.
The SM107 MiniMax-M3.1 targets opt into the disaggregated draft-window transfer (
RuntimeHooks.disagg_draft_kv=True), which ships an unpaired pool only.select_disagg_draft_kv_cache_managertherefore raisesValueErrorat executor creation, and every disaggregated worker with block reuse fails to start.The conflict comes from serving mode, not from the GPU. The pairing decision did not know that the worker is disaggregated.
Fix (2 commits):
KvCacheCreator._joint_reuse_supporteddeclines the pairing for a disaggregated worker that ships the drafter window. It uses the selector's own opt-in predicate,model_ships_disagg_draft_window, factored out ofselect_disagg_draft_kv_cache_manager, so the creator never carves a pool the selector refuses.DFlashWorker._ctx_base_for_store). A 128-token page therefore hides up to 127 tail tokens from the drafter, while a 64-token page hides up to 63.ValueErrorWhy not #23 (gate the 128-token pages on SM100/SM103):
disagg_draft_kvwould still hit theValueError.page_size=128pool, and AL matches the SPEED-Bench golden at K=1..7 within ±0.2% over 166 passes.Test Coverage
Unit tests.
TestDraftPoolPageSize::test_disagg_draft_window_keeps_the_pool_unpairedcovers four cases: aggregated, disaggregated with the window transfer, disaggregated with the kill switch, and disaggregated without the opt-in. Each case checks the draft page size and the pairing decision, and checks that the selector accepts the pool the creator carves.On a Rubin GPU:
test_draft_tokens_per_block,test_joint_reuse_needs_one_page_size,test_paired_draft_reuse(8) andtest_kv_cache_v2_scheduler(325).20a1a00, so they are not from this PR:test_estimation_temporarily_uses_inferred_pool_sizing;test_gen_init_sizing_is_inert_on_a_context_only_worker:DFlashWorkerhas no_ctx_stored_host, whicha66e3b5added without updating this test.Vera Rubin (SM107) end to end
Setup:
trtllm-m31-vr-pr-edc2be364a. Its Python is byte-identical to1aa2dfca65; the branch commits and each candidate are applied as a sha256-checked overlay.use_rejection_samplingwithrejection_sample_method: block, K=7./v1/completions.ValueErrorGolden: 4.04.
draft_kv_fallback=0), 0 tracebacks, 320/320 requests succeeded.Known limit (not introduced here): disagg AL after CTX-side prefix hits.
_ctx_base_for_store,dflash_rebased_ctx_view), and the transfer reproduces exactly that window.transceiver.py: "No cached-prefix mask"), so that is a follow-up feature.PR Checklist
🤖 Generated with Claude Code