feat(dynamo): support native weight transfer - #3178
Open
biswapanda wants to merge 5 commits into
Open
Conversation
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
Why: Discovery lets Prime-RL generate through Dynamo, but RL training also requires every external inference worker to receive each new trainer weight version. The existing collective setup assumes locally managed engines and cannot safely initialize multi-rank Dynamo workers.
Changes:
Dependencies
This branch includes those prerequisite commits because every upstream PR currently targets
main. Its effective diff will shrink as the prerequisites merge.Test plan
ruff checkon the combined changed surfaceNote
High Risk
Changes NCCL/NIXL process-group membership, broadcast initialization, and weight-update RPC paths for production inference; mis-ranking or world-size mismatch would deadlock or corrupt weights.
Overview
Enables native in-memory weight transfer (NCCL/NIXL) against externally managed Dynamo/vLLM inference instead of only locally launched engines.
Discovery and config:
ClientConfig.dynamo_discovery_urldiscovers admin endpoints and per-engineworld_sizefrom/v1/rl/workers(mutually exclusive withadmin_base_urland elastic). Shared/orchestratorweight_broadcast.inference_world_sizeis required for Dynamo and propagated for topology checks; NCCL’s local “≥2 GPUs” guard is skipped when inference is external but an explicit world size is set.Rank topology: Broadcast init passes per-engine
rank_offset,engine_world_size, and optional/collective_rpc(Dynamo path) instead of assuming one GPU per admin URL. vLLM workers map to global ranks viaglobal_inference_rank(TP/PP/DP and dense vs MoEdata_parallel_sizequirks).Runtime: New
DynamoInferencePoolwires discovered topology into NCCL/NIXL init and full weight updates. NCCL checkpoint-format loads preserve layer/state-dict boundaries (receive_state_dicts+ layerwise apply). Orchestrator callspolicy_inference.init_*_broadcaston the pool abstraction (static, elastic, Dynamo).Reviewed by Cursor Bugbot for commit ce7ed14. Bugbot is set up for automated code reviews on this repo. Configure here.