[PoC] Minimal DSpark PD handoff with Prefill PP (no local DSPARK) - #4
Draft
learning-sketch wants to merge 1 commit into
Draft
learning-sketch wants to merge 1 commit into
learning-sketch wants to merge 1 commit into
Conversation
Add a short-validation path inspired by sgl-project#29705 metadata-buffer transfer: Prefill can run with pp_size>1 without --speculative-algo DSPARK, capture PP-aware target aux hidden, and send a short tail to Decode via existing PD metadata buffers. Decode DSPARK injects that tail into draft KV before the first draft step. This is intentionally not the full sgl-project#31466 RDMA DSPARK_HIDDEN streaming path. Co-authored-by: learning <learning-sketch@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.
Summary
Short-validation PoC for DSpark + PD, allowing Prefill to use
--pp-size > 1without--speculative-algo DSPARK.Inspired by closed #29705 (metadata-buffer handoff), not the full #31466 RDMA
DSPARK_HIDDENstreaming path.Behavior
--disaggregation-mode prefill --pp-size > 1, no DSPARK--disaggregation-mode decode --speculative-algo DSPARK --pp-size 1Key changes
dspark_components/dspark_disaggregation.pyhelpers (layer-id resolve, metadata sizing, draft-input build, inject)MetadataBufferscarriesdspark_prefill_tail_*pd_aux_hidden_states_*SGLANG_DSPARK_PD_ENABLE_PREFILL_CAPTURE,SGLANG_DSPARK_PD_TARGET_LAYER_IDS,SGLANG_DSPARK_PD_PREFILL_TAIL_TOKENSdocs_new/docs/advanced_features/dspark_pd_pp_poc.mdtest/registered/unit/disaggregation/test_dspark_pd_metadata_poc.pyLimits (intentional)
Example
Test plan
PYTHONPATH=python python3 -m unittest test.registered.unit.disaggregation.test_dspark_pd_metadata_poc -vpp=2(no DSPARK) + Decode DSPARKpp=1SGLANG_DSPARK_PD_TARGET_LAYER_IDSon both if needed)