Repository navigation
Nanz/sc update - #4566
Nanz/sc update#4566nanz-nv wants to merge 3 commits into
Conversation
Read loss_fn.seq_logprob_error_in_loss once in SingleControllerActor __init__ instead of from _master_config inside _advantage_stage. The advantage-stage unit tests stub _master_config without loss_fn and would raise AttributeError; set the new flag on their controller stubs. Reject token_capture.enabled with seq_logprob_error_in_loss: in-loss mode uses all-response advantage baselines (valid_mask=None), which would let token-capture placeholder rows (sample_mask=0) vote in their siblings' baselines. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Carlos Gomes <[email protected]>
|
|
||
| def evaluation_only_checkpoints(master_config: MasterConfig) -> bool: | ||
| """Opt-in weights-only endpoints are for evaluation, never SC recovery.""" | ||
| deferred = getattr(algo_config(master_config), "deferred_evaluation", None) |
There was a problem hiding this comment.
1 action item — please fix in this PR.
TL;DR — grpo.deferred_evaluation is an undeclared, unvalidated extra key on GRPOConfig (extra="allow", grpo.py:326), so misconfigurations fail late or silently.
enabled: truewithoutweights_onlystill overrides the save schedule (single_controller.py:3096-3101), butevaluation_only_checkpoints()is False so the guards at L1289-1298 (GRPO-only, checkpointing enabled, nosave_optimizer) are skipped.- Missing
first_stepraisesKeyErrorat the end of training step 1, not at setup. first_step <= 0or> max_num_stepsis accepted, so the first endpoint is never saved.
Action: add a typed DeferredEvaluationConfig(BaseModel) (enabled: bool = False, first_step: int | None, weights_only: bool = False) as a GRPOConfig field, validate 1 <= first_step <= max_num_steps, run the guards whenever enabled is true, and add an exemplar YAML entry (config-conventions). While there, consider declaring evaluation_only / training_step_end_time_ms on GRPOSaveState; they are currently attached ad hoc and persist only via vars().
|
We should also retest convergence and perf to ensure no regression, once this MR becomes more mature. |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Nan Zheng <[email protected]>
Cherry-picked from #4566, keeping only the TRT-LLM + SingleController part; the in-loss sequence-logprob filtering and offline-evaluation parts of that commit are not included. - setup: TRT-LLM cluster topology, generation build, max sequence length, and NeMo-Gym support (build generation, then start Gym). - TrtllmGeneration.validate_settings rejects SC options TRT-LLM cannot honor before any resources are reserved. (cherry picked from commit b3c187a) Signed-off-by: shuyixiong <[email protected]>
…E1 recipe Follow-up to the TRT-LLM + SingleController cherry-pick from #4566: - Size TRT-LLM replicas with main's disaggregation schema (replica_width) instead of the older trtllm_cfg.disaggregation keys. - Build TRT-LLM generation in parallel with the trainer; NeMo-Gym waits for the generation future and fails if any shard lacks a server URL. - Type validate_settings against MasterConfig and resolve PD layout via resolve_disagg_layout. - Add the grpo-qwen3-1.7b-2n4g-megatron-trtllm-disagg-swe1-single-controller recipe and test-suite driver (PD disagg + NeMo-Gym SWE1). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: shuyixiong <[email protected]>
What does this PR do ?
Adds TRT-LLM support to the single-controller path, including prefill/decode disaggregation, in-loss sequence filtering with legacy-compatible advantage baselines and gradient normalization, and offline evaluation. Rejects token capture with in-loss filtering to prevent placeholder rows from affecting group advantages
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