Repository navigation
[Fix] Load a draft's tensor weight update from its deployment TP rank - #42346
Merged
Merged
Conversation
ch-wan
requested review from
Fridge003,
Ying1123,
hnyls2002,
ispobock and
merrymercy
as code owners
October 3, 2026 05:21
This was referenced Oct 3, 2026
ch-wan
force-pushed
the
cheng/hot-fix/draft-tensor-update-rank
branch
from
October 3, 2026 06:40
a778835 to
f77b7d1
Compare
`update_weights_from_tensor` takes a `LocalSerializedTensor` holding one entry per deployment TP rank and indexed it with the rank the WeightUpdater recorded at init. An attention-owning draft (EAGLE3 with attention DP) records its attention-TP rank there, so it opened another GPU's IPC handle, and loaded another rank's tensor whenever the entries differ. Index with the deployment TP rank read at update time; the scheduler runs weight updates outside any draft placement scope.
ch-wan
force-pushed
the
cheng/hot-fix/draft-tensor-update-rank
branch
from
October 3, 2026 21:51
f77b7d1 to
a68f602
Compare
3 of 5 tasks
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.
This PR is part of a stack (oldest at bottom):
Motivation
With EAGLE3 and attention data parallelism, a draft worker owns attention and is built inside the draft TP scope, where the context answers its narrowed attention-TP rank.
WeightUpdaterrecords that rank at construction. Butupdate_weights_from_tensorreceives aLocalSerializedTensorholding one entry per deployment TP rank, so indexing it with the narrowed rank opens another rank's CUDA IPC handle: the draft loads another rank's tensor whenever the entries differ, and creates a context on that rank's device.Modifications
Index the payload with the deployment TP rank, read at update time. The scheduler runs weight updates outside any draft placement scope, so
get_parallel().tp_rankthere is the deployment rank.init_weights_update_groupkeeps the recorded rank: only the target joins that group.Accuracy Tests
H200, Qwen3-8B with the
AngelSlim/Qwen3-8B_eagle3draft,--tp-size 2, GSM8K 300 questions:--attn-dp-size 2Greedy text (4 prompts × 48 tokens) is byte-identical across all three plain runs and all three attention-DP runs. Accept length and throughput sit inside the base spread.
The premise was confirmed on a live server: under
--attn-dp-size 2, world rank 1 reports the draft's recorded rank as 0 while its deployment rank is 1, so the pre-fix index would have opened rank 0's handle. Under plain--tp 2both are 1, matching the claim that the bug needs attention DP.test_weight_update_tensor_rank.pyfails with the one line reverted and passes with it.unit/specandunit/model_executor: same results as the parent commit.Speed Tests and Profiling
Not applicable.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #37156465078
Latest PR Test (Extra): ❌ Run #37156464945
Latest PR Test (AMD ROCm 10): ❌ Run #37156465035