Repository navigation
Conversation
Co-authored-by: Baizhou Zhang <[email protected]>
This was referenced Nov 10, 2026
41 of 42 tasks
This branch has not been deployed
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.
Original authors: @yhyang201 @Fridge003
Port of #48414
Main rejects DFLASH whenever
pp_size != 1. #48414 runs it on a pipelined PD prefill: only the last stage builds the draft, the aux hidden states reach it on the PP proxy (thedspark_hidden_statespath DSPARK already uses), and it sends the prompt's draft KV with its own layers. Earlier stages run the target only and budget no draft KV. Decode and non-disaggregated serving still requirepp_size == 1.Changes against the raw port (first commit):
draft_kv_ring_enabled()in_has_dflash_draft_kv, the ring wording in the Mooncake check). The ring is a later port.__init__under a PP topology override (earlier stage: no draft build; last stage: draft built in a single-member pp scope with the target's seed and the stage-local load group).test_mooncake_dflash_tp_mismatch_allows_dcp_collapsed_mla_draftusednum_draft_entries=0for its MHA-like draft, which the new guard skips. It now registers K and V entries of one draft layer, and a new case covers a manager with no draft entries.DSparkWorkerV2(same_hosts_draftgate,spec_v2_attn_backendsfrom the base class). The class-level_hosts_draft = Truestays because stub-built tests (object.__new__) reach gated methods without setting it.is_dflash_family()branch builds the PP draft input for DFLASH and DSPARK. DSPARK'smake_next_draft_inputonly forwards tomake_draft_input_v2.Behavior changes:
pp_size == 1are unchanged.kv_layer_ids[-0:]took the whole target list and the check rejected the peer.random_seed=target_worker.random_seedon every launch,pp_size == 1included. The value does not change (the target's seed comes from the same world broadcast); the draft's own broadcast is skipped. The load group is stage-local only whenpp_size > 1.Left for the draft KV ring port: the empty
DRAFT_RING/REQUEST_ROWslots on earlier stages.Modifications
arg_groups/speculative_hook.py,validation_hook.py: allow DFLASH with PP on a PD prefill only.speculative/dflash_worker_v2.py:_hosts_draft(last PP stage). Earlier stages skip the draft build, pools, backends, graphs and sampling prewarm, and forward the target with aux capture.managers/scheduler_pp_mixin.py: notopk_prelay for the DFLASH family. Every stage builds the sameDFlashDraftInputV2from the bonus token.model_executor/pool_configurator.py: only the last stage budgets the draft KV (DFLASH and DSPARK).disaggregation/mooncake/conn.py: skip the draft reslice check when no draft entries are registered.Results
Unit tests (CPU, rebased on
6d12127cbb):test_dflash_pp_prefill4 passed;test_pool_configurator73 passed (+43 subtests);test_server_args360 passed (+244 subtests);test_disaggregation_wire79 passed (+110 subtests);test_disagg_idle_step_counters22 passed (+51 subtests);test_pp_cp_rank_offsets5 passed;test_weight_update_runnersandtest_dflash_draft_graph_eligibilitypass.PD end to end with a pipelined prefill has not been run yet. It needs two 8-GPU nodes. Like DSPARK, it needs a target that relays aux hidden states across stages (
kimi_k3,kimi_linear).CI States
Latest PR Test (Base): ❌ Run #42912825724
Latest PR Test (Extra): ❌ Run #42912824991
Latest PR Test (AMD ROCm 10): ❌ Run #42912825011
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: