Repository navigation
Conversation
Non-colocated vLLM engines now quantize the BF16 collective refit stream through vLLM's native reload API, so generation.nvfp4_pertoken_rollout no longer requires colocated rollout and SingleController accepts it. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: shuazhang <[email protected]> Signed-off-by: Shuai Zhang (Worldwide Field Ops) <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Shuai Zhang (Worldwide Field Ops) <[email protected]>
|
/ok to test 6a48869 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
Requesting changes for the distillation teacher setup failure (C1) and the false-green result in watched launches (C2). C3–C5 cover lower-impact corrections.
I reviewed all 14 changed files and their directly affected paths with three delegated reviewers. This was a static review: I did not run tests or verify CI results. The convergence comparisons and GPU runs in the PR description are author-reported evidence.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
| nvfp4_entry_point = "single_controller_distillation" | ||
| else: | ||
| nvfp4_entry_point = "single_controller" | ||
| normalize_nvfp4_pertoken_policy_config(policy_config, entry_point=nvfp4_entry_point) |
There was a problem hiding this comment.
C1 · 1 action item.
TL;DR — [BUG, confidence 95] The newly admitted NVFP4 distillation path applies the student's rollout requirements to frozen teachers.
An NVFP4 student with a separate BF16 teacher cannot start when the teacher overrides disable FP4 and clear the TE precision recipe. This normalization call leaves the rollout block in the policy config that setup passes to teacher creation. Teacher construction copies that config and applies its precision overrides, but keeps the rollout flag. The teacher therefore enters the student NVFP4 prerequisite check and raises instead of using its configured precision. Different-depth teachers can also fail the student rollout-boundary comparison. A frozen scoring teacher should not need to match the student's rollout representation.
AI-1
Action: Remove the student's rollout-only block immediately after the teacher's deep copy:
if cfg.get("generation") is not None:
cfg["generation"].pop("nvfp4_pertoken_rollout", None)This targets a different file outside the diff, so it is not an in-place suggestion. Keep the student's normalized block, the teacher's other sampling fields, and explicit teacher precision overrides unchanged.
Proposed acceptance checks, not executed: construct a teacher from an NVFP4 student and assert that only the teacher copy lacks the rollout block. Teacher precision setup with FP4 disabled and no TE recipe must not raise the student NVFP4 prerequisite error. A 48-layer student and 80-layer teacher must not compare their rollout boundaries. Retain the existing router-replay and provider-override isolation assertions and pretrained-checkpoint isolation assertions. Verify the proposed code before adopting it.
There was a problem hiding this comment.
C11 · No action needed — status note on the bot's C1; no new ask.
TL;DR — the bot's C1 is still open at 658e324, and this PR is what makes it reachable on SingleController: before, the flag was rejected in config validation, so a teacher was never built with it.
- Still open: none of b357e16, 6ac98aa, 658e324 touches it.
- The base rejected the flag in config validation (linked at the base, since this PR deletes it).
- The teacher strips
draft, router replay andpretrained_checkpoint, but notgeneration.nvfp4_pertoken_rollout, from its copy of the policy config. Its worker then reaches the student check and raises when the teacher overrides turn FP4 off. - It fails loudly at start-up, on an entry point that already warns as unvalidated. The removal proposed in the bot's C1 fits next to those sibling lines in the teacher, and there it also covers the legacy GRPO teacher path, which builds teachers from the same config.
How far this was verified
Static trace only; not run.
There was a problem hiding this comment.
C16 · No action needed — fixed in 994c4cc
TL;DR — the teacher's config copy now drops generation.nvfp4_pertoken_rollout, and a test covers it.
| find "$LOG_DIR" -type f -name 'train_data_step*.jsonl' -print | sort -V | ||
| ) | ||
| if [[ ${#TRAIN_DATA_FILES[@]} -ne $MAX_STEPS ]]; then | ||
| echo "[ERROR] Expected $MAX_STEPS rollout JSONL files, found ${#TRAIN_DATA_FILES[@]}" |
There was a problem hiding this comment.
C2 · 1 action item.
TL;DR — [BUG, confidence 95] A watched launch reports success when the final rollout-file assertion fails.
This new driver prints its successful metric table before counting the JSONL files. With passing metrics through step 20 but only 19 files, the driver exits 1 and prints [ERROR]. However, the watched launcher reports METRIC PASS and exits 0 when it finds Metric Checks without a subsequent FAIL. The new driver therefore does not reliably enforce its file-count assertion through that launcher.
AI-1
Action: Include the launcher's failure token in this diagnostic:
| echo "[ERROR] Expected $MAX_STEPS rollout JSONL files, found ${#TRAIN_DATA_FILES[@]}" | |
| echo "[FAIL] Expected $MAX_STEPS rollout JSONL files, found ${#TRAIN_DATA_FILES[@]}" |
Keep the exact file-count comparison and nonzero exit. Proposed acceptance checks, not executed: passing metrics plus 19 files must make a watched launch report METRIC FAIL and exit 1; the same metrics plus 20 files must still pass. Static acceptance: this post-table failure must emit FAIL within the launcher's scanned output. Verify the suggestion before adopting it.
…try point Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Shuai Zhang (Worldwide Field Ops) <[email protected]>
|
/ok to test b357e16 |
Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Shuai Zhang (Worldwide Field Ops) <[email protected]>
|
/ok to test 6ac98aa |
…launch Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Shuai Zhang (Worldwide Field Ops) <[email protected]>
|
/ok to test 658e324 |
sharonyu-115
left a comment
There was a problem hiding this comment.
Thanks for bringing the per-token NVFP4 rollout to SingleController. A few things that work well:
- The collective path reuses the existing
_get_reload_weight_preparerhook, so the shared backend gains no NVFP4-specific branch. - The failure path receives every remaining broadcast, so the trainers are not left blocked. A pure-Python repro over six failure cases confirms this.
- Both SingleController recipes inherit the colocated recipes through
defaults:and override only placement and SingleController plumbing. - The performance evidence (8-node curves against
run_grpo.py,gen_kl_error, ~25 s refit) is adequate for what the PR claims.
Inline comments:
- (C6) A retried refit can reuse half-loaded vLLM layer state when fleet health is on.
- (C8) The setup test covers one of the three entry-point arms.
- (C9) The doc sentence about async samplers says more than was run.
- (C10) Four docstrings still say IPC only.
- (C11) Reply on the bot's C1 thread: still open.
The bot's C2 and C3 are fixed in 658e324 and b357e16.
Scope: static review plus CPU unit runs with vLLM 0.33.0; no GPU run. As the PR description notes, the 8-node comparison and the async-sampler runs predate the rebase onto vLLM 0.33.
Generated by Claude Code
| logger.exception( | ||
| "Failed to drain the collective sender after reload failure" | ||
| ) | ||
| raise |
There was a problem hiding this comment.
C6 · 2 action items. Correctness bug on a non-default path, introduced by this PR.
TL;DR — when the reload fails mid-stream, this except block does not reset vLLM's per-layer reload state, so a retried refit on the same engine reuses half-loaded layers: wrong weights are possible and nothing raises.
It needs async_rl.generation_fleet_health.enabled: true (default false) and a refit that breaks mid-stream. With fleet health off, the run ends and nothing is retried.
- vLLM's
reload_weightsruns initialize → load → finalize, with no cleanup when the load raises:initialize_layerwise_reload(model) loaded_weights = model.load_weights(weights_iterator) finalize_layerwise_reload(model, model_config)
- When the refit watchdog aborts the NCCL group mid-refit, the next broadcast raises
RefitAbortedfrom inside the weight iterator, which is inside the load step, so finalize never runs. - This
exceptblock closes the iterator and receives the remaining broadcasts, but leaves vLLM's per-layer reload state as it was. The native layerwise path resets it with_abort_layerwise_reload, called here. - With fleet health on, SingleController retries the refit once on the same engines.
- On the retry, vLLM skips every layer that is still marked as loading. That layer keeps the byte count and buffered tensors of the interrupted attempt, finishes early, and the rest of its tensors are written without the quant method's post-load step. Nothing raises.
AI-1
Action: reset vLLM's per-layer state before re-raising, as the native layerwise path does:
| raise | |
| # A failed reload skips vLLM's finalize. Reset its per-layer state so | |
| # a retry on this worker does not reuse the half-loaded layers. | |
| try: | |
| _abort_layerwise_reload(self.model_runner.model) | |
| except Exception: | |
| logger.exception("Failed to reset the layerwise reload state") | |
| raise |
AI-2
Action: add the regression test below right after test_collective_refit_with_preparer_rejects_partial_reload in test_vllm_backend.py. It is a new function in a different file than this anchor, so it is a plain fence, not a suggestion block. It passes only once AI-1 is applied.
Regression test (fails at head, passes with AI-1)
@pytest.mark.vllm
def test_collective_refit_with_preparer_retry_after_failed_reload(monkeypatch):
"""A refit retried on the same worker must not reuse half-loaded layers."""
from vllm.model_executor.layers.quantization.base_config import QuantizeMethodBase
from vllm.model_executor.model_loader.reload.layerwise import (
finalize_layerwise_reload,
initialize_layerwise_reload,
record_metadata_for_reloading,
)
from vllm.model_executor.model_loader.weight_utils import default_weight_loader
from nemo_rl.models.generation.vllm import vllm_backend
class _TimesTen(QuantizeMethodBase):
"""Kernel format differs from checkpoint format, like a real quant method."""
def create_weights(self, layer, *args, **kwargs):
raise NotImplementedError
def apply(self, layer, *args, **kwargs):
raise NotImplementedError
def process_weights_after_loading(self, layer):
for param in layer.parameters():
param.data.mul_(10)
model = torch.nn.Module()
for layer_name in ("a", "b"):
layer = torch.nn.Module()
for index in range(2):
layer.register_parameter(
f"p{index}", torch.nn.Parameter(torch.zeros(2), requires_grad=False)
)
layer.quant_method = _TimesTen()
model.add_module(layer_name, layer)
record_metadata_for_reloading(model)
names = [name for name, _ in model.named_parameters()]
def reload_weights(*, weights_iterator, is_checkpoint_format):
# The checkpoint-format body of vLLM's reload_weights.
assert is_checkpoint_format is True
initialize_layerwise_reload(model)
for name, tensor in weights_iterator:
param = model.get_parameter(name.removeprefix("prepared."))
getattr(param, "weight_loader", default_weight_loader)(param, tensor)
finalize_layerwise_reload(model, None)
failing = _RecordingPreparer(fail_on=names[1])
ext, _, _ = _make_collective_reload_extension(monkeypatch, vllm_backend, failing)
ext.state_dict_info = {name: object() for name in names}
ext.model_runner.model = model
ext.model_runner.reload_weights = reload_weights
with pytest.raises(RuntimeError, match="preparer failed"):
ext.update_weights_from_collective()
ext._get_reload_weight_preparer = lambda: _RecordingPreparer()
assert ext.update_weights_from_collective() is True
# Every tensor in the stream is ones(2); the quant method scales it once.
for name, param in model.named_parameters():
assert torch.equal(param, torch.full((2,), 10.0)), nameContext — no action. The older refit_with_reload_api branch has the same gap; the new method follows that pattern, and AI-1 changes only the new method. AI-1 passes self.model_runner.model as the root because that is what the existing reset path uses.
Test results and what was not run
- A CPU test that runs vLLM 0.33.0's real layerwise functions through the collective refit call fails at head with
AssertionError: a.p1(tensor([1., 1.])wheretensor([10., 10.])is expected) and passes with AI-1. - AI-1 applied on a scratch copy: ruff 0.9.9 clean;
-k collectiveintest_vllm_backend.py: 28 passed. - Not run on a real NVFP4 routed-experts layer (no GPU). The claim is that the retry reuses half-loaded per-layer state, not a specific corruption.
There was a problem hiding this comment.
C18 · No action needed — fixed in 994c4cc
TL;DR — the failure path now resets vLLM's per-layer reload state before it re-raises, and the retry test is added.
| def test_nvfp4_pertoken_normalized_as_validated_grpo_entry_point( | ||
| self, patched_factories: dict[str, Any] | ||
| ) -> None: | ||
| mc = _make_master_config(colocated=colocated, megatron_enabled=True) | ||
| mc = _make_master_config(megatron_enabled=True) | ||
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = {"enabled": True} | ||
|
|
||
| with pytest.raises( | ||
| ValueError, | ||
| match="SingleController does not support generation.nvfp4_pertoken_rollout", | ||
| ): | ||
| with patch.object( | ||
| sc_setup_mod, "normalize_nvfp4_pertoken_policy_config" | ||
| ) as normalize: | ||
| setup_single_controller(mc, MagicMock(pad_token_id=0)) | ||
|
|
||
| for factory in ( | ||
| "setup_response_data", | ||
| "_build_clusters", | ||
| "_build_generation", | ||
| "_build_trainer", | ||
| ): | ||
| patched_factories[factory].assert_not_called() | ||
|
|
||
| @pytest.mark.parametrize("rollout", [None, {"enabled": False}]) | ||
| def test_nvfp4_pertoken_off_preserves_single_controller_validation( | ||
| self, rollout: dict[str, bool] | None | ||
| ) -> None: | ||
| mc = _make_master_config() | ||
| if rollout is not None: | ||
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = rollout | ||
| validate_single_controller_config(mc) | ||
| normalize.assert_called_once_with(mc.policy, entry_point="single_controller") |
There was a problem hiding this comment.
C8 · 1 action item. Test gap, introduced by this PR.
TL;DR — this test reaches only the last arm of the three-way entry-point choice, so relabelling the PPO or distillation arm as validated, or reverting the disabled-distillation fix from b357e16, breaks no test.
The entry-point choice has three arms. Nothing covers the PPO arm, the distillation arm, or the disabled-distillation case fixed in b357e16.
AI-1
Action: replace this test with one parametrized over plain GRPO, disabled distillation, enabled distillation and PPO. Like the two tests this PR deleted (linked at the base, since they no longer exist at head: test_setup.py L856-L883), it also checks that no builder ran before the call.
| def test_nvfp4_pertoken_normalized_as_validated_grpo_entry_point( | |
| self, patched_factories: dict[str, Any] | |
| ) -> None: | |
| mc = _make_master_config(colocated=colocated, megatron_enabled=True) | |
| mc = _make_master_config(megatron_enabled=True) | |
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = {"enabled": True} | |
| with pytest.raises( | |
| ValueError, | |
| match="SingleController does not support generation.nvfp4_pertoken_rollout", | |
| ): | |
| with patch.object( | |
| sc_setup_mod, "normalize_nvfp4_pertoken_policy_config" | |
| ) as normalize: | |
| setup_single_controller(mc, MagicMock(pad_token_id=0)) | |
| for factory in ( | |
| "setup_response_data", | |
| "_build_clusters", | |
| "_build_generation", | |
| "_build_trainer", | |
| ): | |
| patched_factories[factory].assert_not_called() | |
| @pytest.mark.parametrize("rollout", [None, {"enabled": False}]) | |
| def test_nvfp4_pertoken_off_preserves_single_controller_validation( | |
| self, rollout: dict[str, bool] | None | |
| ) -> None: | |
| mc = _make_master_config() | |
| if rollout is not None: | |
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = rollout | |
| validate_single_controller_config(mc) | |
| normalize.assert_called_once_with(mc.policy, entry_point="single_controller") | |
| @pytest.mark.parametrize( | |
| ("algorithm", "entry_point"), | |
| [ | |
| ("grpo", "single_controller"), | |
| ("disabled_distillation", "single_controller"), | |
| ("distillation", "single_controller_distillation"), | |
| ("ppo", "single_controller_ppo"), | |
| ], | |
| ) | |
| def test_nvfp4_pertoken_entry_point_names_the_algorithm( | |
| self, patched_factories: dict[str, Any], algorithm: str, entry_point: str | |
| ) -> None: | |
| """Only plain GRPO is validated; PPO and enabled distillation must warn.""" | |
| class _ReachedNormalization(Exception): | |
| pass | |
| mc = _make_master_config( | |
| megatron_enabled=True, | |
| env={"should_use_nemo_gym": algorithm == "distillation"}, | |
| ) | |
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = {"enabled": True} | |
| if algorithm == "ppo": | |
| mc.ppo = PPOConfig.model_construct(**dict(mc.grpo)) | |
| mc.grpo = None | |
| mc.value = {"megatron_cfg": {"enabled": True}, "train_global_batch_size": 8} | |
| mc.value_loss_fn = MseValueLossConfig() | |
| elif algorithm == "distillation": | |
| mc.grpo.adv_estimator = AdvEstimatorConfig(name="opd") | |
| mc.on_policy_distillation = OnPolicyDistillationConfig( | |
| enabled=True, | |
| teacher_model_by_agent_name={"teacher": "/ckpt/teacher"}, | |
| default_teacher_alias="teacher", | |
| non_colocated_teachers={"enabled": True}, | |
| ) | |
| elif algorithm == "disabled_distillation": | |
| mc.on_policy_distillation = OnPolicyDistillationConfig(enabled=False) | |
| # Stop setup at the call: the builders must not have run before it. | |
| with ( | |
| patch.object( | |
| sc_setup_mod, | |
| "normalize_nvfp4_pertoken_policy_config", | |
| side_effect=_ReachedNormalization, | |
| ) as normalize, | |
| pytest.raises(_ReachedNormalization), | |
| ): | |
| setup_single_controller(mc, MagicMock(pad_token_id=0)) | |
| normalize.assert_called_once_with(mc.policy, entry_point=entry_point) | |
| for factory in ("_build_clusters", "_build_generation", "_build_trainer"): | |
| patched_factories[factory].assert_not_called() |
Mutation results and test run for the suggestion
- Without the suggestion: with both other arms relabelled to
"single_controller"and the b357e16 condition reverted, all 32-k nvfp4tests intest_setup.pyandtest_vllm_generation.pystill pass. - With the suggestion, on a CPU env with vLLM 0.33.0: 4 passed at head.
disabled_distillationfails with the b357e16 fix reverted;distillationandppofail when the arms are relabelled. - ruff 0.9.9 clean; every name the suggestion uses is already imported in the file.
There was a problem hiding this comment.
C19 · No action needed — fixed in 994c4cc
TL;DR — the setup test is now parametrized over the four cases.
| ``` | ||
|
|
||
| The recipe trains on 4 nodes and serves rollouts from the other 4. Validation is not available on SingleController yet, so the recipe turns it off. | ||
| The recipe is on-policy (`in_order`, zero lookahead); the asynchronous samplers also work and pause in-flight rollouts across each quantized refit. |
There was a problem hiding this comment.
C9 · 1 action item. Doc wording, introduced by this PR.
TL;DR — "the asynchronous samplers also work" reads as covering every async sampler, but the PR description lists runs for in_order with lookahead 1 and windowed with staleness 1 only, and says weight_fifo and ready_first were not run.
The second half of the sentence is correct: _sync_weights pauses in-flight rollouts across each quantized refit.
AI-1
Action: name the samplers that were run:
| The recipe is on-policy (`in_order`, zero lookahead); the asynchronous samplers also work and pause in-flight rollouts across each quantized refit. | |
| The recipe is on-policy (`in_order`, zero lookahead). `in_order` with lookahead 1 and `windowed` with staleness 1 were also run; `ready_first` and `weight_fifo` were not. In-flight rollouts pause across each quantized refit. |
There was a problem hiding this comment.
C20 · No action needed — fixed in 994c4cc
TL;DR — the doc now names the samplers that were run.
| ) -> None: | ||
| """Receive collective weights through vLLM's native layerwise reload API. | ||
|
|
||
| The collective counterpart of ``_update_weights_via_ipc_zmq_with_reload``. |
There was a problem hiding this comment.
C10 · 1 action item. Doc wording, low severity; the docstrings went stale with this PR.
TL;DR — this new method feeds the same preparer from NCCL broadcasts, but four docstrings outside the diff still say the tensors come from an IPC buffer, so they now describe only one of the two transports.
The rule that applies: comments-docstrings-and-docs.md ("After a rename, move or deletion, grep comments, docstrings and docs/ for the old name or the old behaviour, including files the diff does not touch").
AI-1
Action: reword these four docstrings. None of them is on a diff line, so there is no suggestion block:
_ReloadWeightPreparer: "must not reference the source IPC buffer, because it is released as soon as the batch is acknowledged" → name the transport's receive buffer (IPC allocation or collective receive buffer).PendingHalf: "cloned off the refit IPC buffer" → "cloned off the refit receive buffer".NvFp4PerTokenQuantizer.process: "cloned off the IPC buffer" and "recycled this batch's IPC buffer" → "receive buffer" in both places.NvFp4PerTokenWorkerExtension: "IPC weight updates enter vLLM through its nativereload_weightsAPI" → "IPC and collective weight updates enter ...".
There was a problem hiding this comment.
C21 · No action needed — fixed in 994c4cc
TL;DR — the four docstrings now name the receive buffer or both transports.
| nvfp4_entry_point = "single_controller_distillation" | ||
| else: | ||
| nvfp4_entry_point = "single_controller" | ||
| normalize_nvfp4_pertoken_policy_config(policy_config, entry_point=nvfp4_entry_point) |
There was a problem hiding this comment.
C11 · No action needed — status note on the bot's C1; no new ask.
TL;DR — the bot's C1 is still open at 658e324, and this PR is what makes it reachable on SingleController: before, the flag was rejected in config validation, so a teacher was never built with it.
- Still open: none of b357e16, 6ac98aa, 658e324 touches it.
- The base rejected the flag in config validation (linked at the base, since this PR deletes it).
- The teacher strips
draft, router replay andpretrained_checkpoint, but notgeneration.nvfp4_pertoken_rollout, from its copy of the policy config. Its worker then reaches the student check and raises when the teacher overrides turn FP4 off. - It fails loudly at start-up, on an entry point that already warns as unvalidated. The removal proposed in the bot's C1 fits next to those sibling lines in the teacher, and there it also covers the legacy GRPO teacher path, which builds teachers from the same config.
How far this was verified
Static trace only; not run.
Signed-off-by: Zhang Shuai <[email protected]>
- Reset vLLM's layerwise reload state when a collective reload fails, so a retried refit does not reuse half-loaded layers. - Drop the student's per-token NVFP4 rollout block from distillation teachers. - Cover every algorithm arm of the NVFP4 entry-point choice in the setup test. - Name the async samplers that were run, and the receive buffer in docstrings. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Zhang Shuai <[email protected]>
…k test SingleController writes training dumps as Parquet since NVIDIA-NeMo#4845, so the JSONL file count is always zero. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Zhang Shuai <[email protected]>
|
/ok to test a899ed8 |
- Add the copyright header to the two new SingleController test scripts. - Test that the preparer path wins over refit_with_reload_api. - State in the design doc that checkpoint save/resume and vLLM TP>1 were not run. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Zhang Shuai <[email protected]>
|
/ok to test 537906a |
zhangyimi
left a comment
There was a problem hiding this comment.
Self-review of a899ed8 (the author's own review, run with the review-pr-team skill).
What holds up:
- The collective path reuses the existing preparer hook, so the NVFP4 quantizer needed no logic change for a second transport.
- The failure path holds in each of four cases (preparer raises, vLLM loader raises, broadcast aborted,
finishraises): the original error is the one raised, the remaining broadcasts are received, and vLLM's per-layer state is reset. - Each override in the two SingleController recipes is needed: reverting any one fails config validation or setup.
- The earlier threads C1, C2, C3, C6, C8, C9 and C10 are fixed at this head.
Inline comments (found at a899ed8, all fixed in 537906a):
- (C12) The doc did not say that checkpoint save/resume was never run on SingleController.
- (C13) No test failed if the preparer branch and the
refit_with_reload_apibranch were swapped. - (C14, C15) The copyright header was missing on the two new
.shdrivers. - (C16 to C21) "Fixed in" notes on the earlier threads.
For the PR description, not an inline ask: examples/run_grpo.py with non-colocated rollout was also run (20/20 steps, sync engine, before the rebase onto vLLM 0.33). It is not in the proof list, and that pair gets no "unvalidated" warning, so the list should name it.
Scope: static review plus CPU runs of the four new collective-refit tests against vLLM 0.33.0 (4 passed, run without the Ray conftest). pre-commit run --all-files passes. No GPU run in this review.
nemo-rl-review: kind=self harness=claude-code/claude model=claude-fable-5-2 effort=medium review-pr-team=v2 reviewed=a899ed8
| nvfp4_entry_point = "single_controller_distillation" | ||
| else: | ||
| nvfp4_entry_point = "single_controller" | ||
| normalize_nvfp4_pertoken_policy_config(policy_config, entry_point=nvfp4_entry_point) |
There was a problem hiding this comment.
C16 · No action needed — fixed in 994c4cc
TL;DR — the teacher's config copy now drops generation.nvfp4_pertoken_rollout, and a test covers it.
| find "$LOG_DIR" -type f -name 'train_data_step*.jsonl' -print | sort -V | ||
| ) | ||
| if [[ ${#TRAIN_DATA_FILES[@]} -ne $MAX_STEPS ]]; then | ||
| echo "[ERROR] Expected $MAX_STEPS rollout JSONL files, found ${#TRAIN_DATA_FILES[@]}" |
| logger.exception( | ||
| "Failed to drain the collective sender after reload failure" | ||
| ) | ||
| raise |
There was a problem hiding this comment.
C18 · No action needed — fixed in 994c4cc
TL;DR — the failure path now resets vLLM's per-layer reload state before it re-raises, and the retry test is added.
| def test_nvfp4_pertoken_normalized_as_validated_grpo_entry_point( | ||
| self, patched_factories: dict[str, Any] | ||
| ) -> None: | ||
| mc = _make_master_config(colocated=colocated, megatron_enabled=True) | ||
| mc = _make_master_config(megatron_enabled=True) | ||
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = {"enabled": True} | ||
|
|
||
| with pytest.raises( | ||
| ValueError, | ||
| match="SingleController does not support generation.nvfp4_pertoken_rollout", | ||
| ): | ||
| with patch.object( | ||
| sc_setup_mod, "normalize_nvfp4_pertoken_policy_config" | ||
| ) as normalize: | ||
| setup_single_controller(mc, MagicMock(pad_token_id=0)) | ||
|
|
||
| for factory in ( | ||
| "setup_response_data", | ||
| "_build_clusters", | ||
| "_build_generation", | ||
| "_build_trainer", | ||
| ): | ||
| patched_factories[factory].assert_not_called() | ||
|
|
||
| @pytest.mark.parametrize("rollout", [None, {"enabled": False}]) | ||
| def test_nvfp4_pertoken_off_preserves_single_controller_validation( | ||
| self, rollout: dict[str, bool] | None | ||
| ) -> None: | ||
| mc = _make_master_config() | ||
| if rollout is not None: | ||
| mc.policy["generation"]["nvfp4_pertoken_rollout"] = rollout | ||
| validate_single_controller_config(mc) | ||
| normalize.assert_called_once_with(mc.policy, entry_point="single_controller") |
There was a problem hiding this comment.
C19 · No action needed — fixed in 994c4cc
TL;DR — the setup test is now parametrized over the four cases.
| ``` | ||
|
|
||
| The recipe trains on 4 nodes and serves rollouts from the other 4. Validation is not available on SingleController yet, so the recipe turns it off. | ||
| The recipe is on-policy (`in_order`, zero lookahead); the asynchronous samplers also work and pause in-flight rollouts across each quantized refit. |
There was a problem hiding this comment.
C20 · No action needed — fixed in 994c4cc
TL;DR — the doc now names the samplers that were run.
| ) -> None: | ||
| """Receive collective weights through vLLM's native layerwise reload API. | ||
|
|
||
| The collective counterpart of ``_update_weights_via_ipc_zmq_with_reload``. |
There was a problem hiding this comment.
C21 · No action needed — fixed in 994c4cc
TL;DR — the four docstrings now name the receive buffer or both transports.
|
@sharonyu-115 All review comments are addressed. Could you take another look? |
What and why
Lets
generation.nvfp4_pertoken_rolloutrun on the SingleController path, which uses non-colocated vLLM.reload_weights, as the colocated IPC path already does. A failed reload resets vLLM's per-layer state, so a retried refit starts clean.nvfp4_pertoken_rolloutno longer requires colocated rollout, and SingleController no longer rejects it.nightly_gb200.txt) and the 8-node one (indisabled.txt, manual).Not covered:
weight_fifo/ready_firstsamplers were not run.Issues
Part of #5044 (NVFP4 per-token item).
Convergence / perf / functionality proof
Qwen3-30B-A3B on GB200.
train/gen_kl_error0.0084.run_grpo.pyrun of the same recipe, figure below: red = SingleController with overlong penalty, green = SingleController without, blue =run_grpo.py. The three runs follow the same curves;train/gen_kl_errorgoes 0.011 → ~0.004. Quantized refit ~25 s per step.in_orderlookahead 1,windowedstaleness 1), 4 nodes, 20 steps: both complete.Only the quick test was rerun after the rebase onto vLLM 0.33.
train/rewardis not the same metric on the two entry points: SingleController logs it after the dynamic-sampling filter,run_grpo.pybefore it (its filtered value istrain/filtered_reward). On the filtered definition the means over steps 1–60 are −0.505 (red), −0.477 (green) and −0.458 (blue), so the gap in the reward panel is the metric, not the training.Needs upstream changes
None.