Repository navigation
fix: mtp gating for the nccl-reshard-refit and fix the error when doing ray RPC. - #3532
youngeunkwon0405 wants to merge 7 commits into
Conversation
|
/okay to test 9736d2f |
9736d2f to
f7ee3a7
Compare
|
/okay to test f7ee3a7 |
f7ee3a7 to
2d9a63c
Compare
|
/ok to test 2d9a63c |
58638d6 to
d47d737
Compare
|
/okay to test d47d737 |
|
/okay to test dd51417 |
Signed-off-by: Youngeun Kwon <[email protected]>
Signed-off-by: Youngeun Kwon <[email protected]>
Signed-off-by: Youngeun Kwon <[email protected]>
dd51417 to
1fdd2a0
Compare
youngeunkwon0405
left a comment
There was a problem hiding this comment.
Team review: 4 agents (RL expert, test reviewer, bug finder, devil's advocate) + lead. All findings below were independently re-verified by the devil's advocate against the pinned submodule SHAs before posting.
Overall: both halves of the PR address real, reproducible failures on the pinned dependencies, and the wire-safe conversion was verified to round-trip exactly (Shard/Replicate/MeshInfo) without mutating the trainer-side original. The pickle mechanism described in the docstring is accurate for the pinned megatron-core: torch.storage._load_from_bytes = safe_load_from_bytes.
8 inline comments: 1 bug on the vLLM side (MTP drafter post-load processing), 1 exception-masking issue in teardown, 1 documented limitation (DeepSeek-V3 MTP naming), 2 test asks, and 3 small doc/style items. Linter (ruff check + format): clean.
Generated by Claude Code
Co-authored-by: Youngeun Kwon <[email protected]> Signed-off-by: Youngeun Kwon <[email protected]>
- vllm_backend: run nccl_reshard_refit finalization through _weight_update_lifecycle so the co-trained MTP drafter gets _maybe_process_mtp_drafter_after_loading() like the ipc/collective transports (freshly refit MTP MoE weights need their runtime layout conversion); widen WeightUpdateTransport with "nccl_reshard" - nccl_reshard_utils: only rewrite wire keys that are present so the wire copy's key set stays faithful to the builder output; list make_nccl_reshard_refit_info_wire_safe in the module docstring - nccl_reshard_weight_synchronizer: hoist the wire-safe import to module top; document the GC intent of dropping _generation - tests: add pure-CPU round-trip tests for the wire-safe conversion (no tensors on the wire, input not mutated, restore reproduces placements/meshes) - docs: document the misc-path exclusions (shared_expert, mtp.) and the DeepSeek-style MTP limitation; describe the wire-safe hop in the setup flow Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Youngeun Kwon <[email protected]>
DeepSeek bridges export MTP weights as trailing main-model layer
indices (model.layers.{N + num_layers}.*), which the mtp. prefix gate
in is_nccl_reshard_param cannot recognize from the HF name alone.
Detect MTP provenance from the Megatron-side name on the Bridge
conversion tasks (uniformly mtp.* for every family) and route those
HF layers to the misc packed-broadcast path, where vLLM's drafter
picks them up via load_weights and the weight-update lifecycle runs
the drafter post-processing.
The helper lives in megatron_policy_worker (it consumes Megatron-
Bridge task objects), keeping nccl_reshard_utils backend-agnostic;
tests are in the mcore-marked worker test file.
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Youngeun Kwon <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Youngeun Kwon <[email protected]>
|
closed since covered by the other prs referencing this one |
What does this PR do ?
This PR is doing two independent things. I split this PR into two.
Goes to #3619
nccl_reshard_refit_infoobject wire-safe before sending it to the generation worker during initialization.nccl_reshard_refit_infocontains torch tensors, created by Megatron. The problem is that Megatron replaces thetorch.storage._load_from_bytesfunction that is required for unpickling to a Megatron-specific function.So, during unpickling from the generation worker, it will call
import megatronwhich will cause an import error.This PR fixes that issue.
Goes to #3618
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information