feat(sc): setup + entrypoint#3266
Conversation
c99f349 to
51924be
Compare
8d8dbfb to
0ff1e12
Compare
a1d41bf to
6580a91
Compare
e63c189 to
9083b7e
Compare
|
The Could this PR (or an immediate follow-up in the stack) add a user-facing markdown that maps configurations to knob settings? A natural home is a "Single-controller async GRPO" section in
…plus the invariants that today live only in YAML comments and setup-time raises: Asking here rather than on #3219/#3220 because this is the PR where the knobs get their final names and become user-settable (the Generated by Claude Code |
283ba7f to
09a88ff
Compare
Signed-off-by: Yuki Huang <yukih@nvidia.com>
… each async_rl field Signed-off-by: Yuki Huang <yukih@nvidia.com>
…sync/streaming variants Signed-off-by: Yuki Huang <yukih@nvidia.com>
…red yet Signed-off-by: Yuki Huang <yukih@nvidia.com>
…ights docs Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
…ersions Signed-off-by: Yuki Huang <yukih@nvidia.com>
Signed-off-by: Yuki Huang <yukih@nvidia.com>
Adapt the split-3 controller, configs, recipes, and tests to the sampler interface introduced by split-2. Signed-off-by: Terry Kong <terryk@nvidia.com> Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
9288d1a to
3164062
Compare
Signed-off-by: ruit <ruit@nvidia.com>
|
/ok to test 0629fed |
Signed-off-by: Yuki Huang <yukih@nvidia.com> Signed-off-by: ruit <ruit@nvidia.com>
|
/ok to test 7c100ad |
Part 3/4 of the #2819 split. See #2819 (reference) or #3267 (4/4) for the full code and context. Stack on #3220.
#3219 (1/4) -> #3220 (2/4) -> #3266 (3/4) -> #3267 (4/4)
Note: NeMo-Gym support goes in PR#4; this PR wires up the non-gym SC path.
Summary
Driver-side setup and CLI entrypoint that make the SC (Single Controller) async-GRPO path end-to-end runnable.
single_controller_utilspackage (setup.py/config.py/utils.py):setup_single_controllerbuilds the worker groups, virtual cluster, dp client, dataloader, TQReplayBuffer, RolloutManager, and weight synchronizer on the driver and returns aSingleControllerActorArgs.config.pycentralizesAsyncRLConfig/AdvantageConfig/WeightSyncConfig/MasterConfig.utils.pyhosts metric-reduction rules andKVBatchMetahelpers.SingleControllerActorslimdown: takes a prebuiltSingleControllerActorArgsand does no construction work — heavy objects are cloudpickled in. Running setup inside a nested Ray actor breaks runtime_env resolution (see feat(policy): split-API train-step state machine on DTensor v1/v2 #2692). Pump crashes propagate and in-flight rollouts drain on exit.AsyncRLConfig: droppedbatch_selection_strategyin favor of explicitmax_staleness_versions+over_sampling; renamedmin_prompt_groups_per_batch→min_groups_for_streaming_train; defaults aligned with the exemplar and each field has a doc comment.examples/run_grpo_single_controller.py: SC CLI entrypoint, mirrorsrun_grpo.pyfor config loading. Requiresdata_plane.enabled=true. Drains env actors on the error path before vLLM shutdown.grpo_math_1B_megatron_single_controller.yamlexemplar plus streaming2 and megatron-sync variants underexamples/configs/recipes/llm/.L1_Functional_Tests_SingleController.shtocicd-main.yml; adds SC recipes tonightly.txtand paired*-single-controller-{streaming2,sync}.shlaunchers.test_single_controller_setup.pycovers the new setup module (with aninit_communicator()assertion). Newtests/functional/grpo_dp_single_controller.shgives the entrypoint a 2-GPU e2e smoke. Rollout/train pump tests migrated to the split configs.Test Results
grpo-qwen2.5-math-1.5b-instruct-1n8g-megatron-single-controller-syncbaseline (DTensor + colocated), SC (Megatron + non-colocated), so only compare convergence.
grpo-llama3.1-8b-instruct-2n8g-async-1off-single-controller-streaming2SC run uses
min_groups_for_streaming_train=num_prompts_per_step,over_sampling=false,force_in_order=true(different from the script in this PR) to keep using the same setting as legacy code for compare.grad_normis ~1/2x smaller and reward is a bit lower.Known Issues (From the above tests results)
grad_normis ~1/2x smaller: fixed in fix: fix single controller grad_norm #3282.invalidate_kv_cacheonly enabled in sync mode, which will cause SC async mode never reset vLLM's prefix cache, tracked in "Known Missing Features" below and [Single Controller / Async RL] cleanup tracking issue #2625.total_step_timeis longer (sincepolicy_and_reference_logprobsis longer), it's because SC'sprev_logprobs_required/reference_logprobs_requiredgating is provisional and didn't skip calculatingprev_logprobsin this run, already tracked in [Single Controller / Async RL] cleanup tracking issue #2625.Known Missing Features (Tracked in #2625 or have PRs)
invalidate_kv_cacheonly enabled in sync mode (max_staleness_versions=1), need to respect torecompute_kv_cache_after_weight_updates.