Skip to content

[Don't merge] feat(grpo): add NRL_GEN_BENCHMARK_SKIP_TRAINING for async generation - #2930

Closed
RayenTian wants to merge 3 commits into
mainfrom
ruit/skip_train
Closed

RayenTian wants to merge 3 commits into
mainfrom
ruit/skip_train

Conversation

@RayenTian

Copy link
Copy Markdown
Contributor

Adds an opt-in generation-benchmark mode for async GRPO, toggled by the NRL_GEN_BENCHMARK_SKIP_TRAINING environment variable (truthy: 1/true/yes/on). In this mode the optimizer is not built and policy.train() is replaced with zero-valued metrics, while generation, refit/weight-sync, and the trajectory-collector/replay-buffer cadence are preserved. This lets generation throughput be benchmarked with training pinned to a minimal (e.g. single-GPU) policy cluster.

  • _gen_benchmark_skip_training(): reads the env var; used in setup() to skip the optimizer + reference model and in async_grpo_train() to no-op training.
  • async_grpo_train(): zero-valued train results via _make_benchmark_dummy_train_results(), still marking generation stale so refit runs each step.
  • Backend-agnostic keep-alive matmul (no NCCL collectives) on policy workers to avoid idle-GPU reapers while training is skipped.

What does this PR do ?

Add a one line overview of what this PR aims to accomplish.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@copy-pr-bot

copy-pr-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

RayenTian and others added 3 commits July 6, 2026 23:24
…benchmarking

Adds an opt-in generation-benchmark mode for async GRPO, toggled by the
NRL_GEN_BENCHMARK_SKIP_TRAINING environment variable (truthy: 1/true/yes/on).
In this mode the optimizer is not built and policy.train() is replaced with
zero-valued metrics, while generation, refit/weight-sync, and the
trajectory-collector/replay-buffer cadence are preserved. This lets generation
throughput be benchmarked with training pinned to a minimal (e.g. single-GPU)
policy cluster.

- _gen_benchmark_skip_training(): reads the env var; used in setup() to skip the
  optimizer + reference model and in async_grpo_train() to no-op training.
- async_grpo_train(): zero-valued train results via
  _make_benchmark_dummy_train_results(), still marking generation stale so refit
  runs each step.
- Backend-agnostic keep-alive matmul (no NCCL collectives) on policy workers to
  avoid idle-GPU reapers while training is skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Signed-off-by: ruit <[email protected]>
@RayenTian RayenTian closed this Jul 22, 2026
@RayenTian
RayenTian deleted the ruit/skip_train branch July 27, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant