fix: expose DDP model view to online rollout - #55
Open
0z5a wants to merge 1 commit 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
DDP.moduletoInferenceSchedulerwhile retaining the wrapped DDP model for training and gradient synchronizationtorch.compileonline-rollout configurations before model/scheduler constructionWhy
TrainContextBuildercurrently passes the training model wrapper directly to inference and readscontext.model.config. A realDistributedDataParallelwrapper does not expose that attribute, so online GRPO/DPO fails while constructing its scheduler even though each DDP rank already owns a replicated underlying module.The executor now declares whether an in-process rollout is supported and returns the model view inference may own. This also prevents sharded FSDP parameters from entering an unsupported generation path by accident.
Validation
Local
ruff format --check .: 167 files formattedruff check . --select I: passed6 passed, 1 deselected626 passed, 104 skippedin 12.57sNVIDIA L20 / SM89
Environment: NVIDIA L20, driver 570.86.10, CUDA 12.8, PyTorch 2.11.0+cu128, Python 3.12.12.
sm_897 passedin 1.54s730 passedin 52.14sDistributedDataParallelwrapper +InferenceScheduler: the executor's inference view produced exactly the same greedy token lists as the underlying replicated modelThe CUDA DDP probe uses
world_size=1. A two-rank GPU run was not performed because two unowned idle GPUs were unavailable; this PR makes no multirank throughput claim. Full evidence is indocs/benchmarks/ddp_rollout_l20_sm89.json.InfraSWE before PR
InfraSWE commit
811bc775ed5b3a6ec853219245f3469f78818020was run before opening this PR:53 passedProjectComparisonCellvalidation: passedproject-fit-system-path-v0.5.1: 92.16/100The score is explicitly non-official and records the missing two-rank cell and absence of a performance-statistics claim. Inputs and rationale are in
benchmarks/results/ddp_rollout_l20_sm89_infraswe_score.json.