Skip to content

feat(grpo): optionally skip replay buffer restore - #3583

Draft
yfw wants to merge 1 commit into
mainfrom
yifu/load_replay_buffer
Draft

yfw wants to merge 1 commit into
mainfrom
yifu/load_replay_buffer

Conversation

@yfw

@yfw yfw commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do ?

Add checkpointing.load_replay_buffer so async GRPO resumes can start with an empty replay buffer while restoring the remaining checkpoint state. Keep restoration enabled by default and for legacy configs that omit the field.

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

  • ...

Add checkpointing.load_replay_buffer so async GRPO resumes can start with an empty replay buffer while restoring the remaining checkpoint state. Keep restoration enabled by default and for legacy configs that omit the field.

Signed-off-by: Yi-Fu Wu <[email protected]>
@yfw
yfw requested review from a team as code owners August 11, 2026 18:22
@copy-pr-bot

copy-pr-bot Bot commented Aug 11, 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.

@yfw yfw added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Aug 11, 2026
@yfw

yfw commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 4256540

@yfw
yfw marked this pull request as draft August 13, 2026 20:30
pjin-nvidia pushed a commit that referenced this pull request Aug 24, 2026
…ier path

Resuming from a restored replay buffer biases the next steps toward
short-rollout prompts: a prompt group completes only when its longest
rollout finishes, so the groups sitting in the buffer at a save boundary
are systematically the short ones, while the long-rollout groups were
in flight. checkpointing.load_replay_buffer=false opts out of the
restore, and with frontier-aligned checkpoints that is simply the
empty-retained-set case of the same resume path: the dataloader is
rewound to the trained frontier and the whole buffered window is
regenerated fresh under one weight version — unbiased composition at
the cost of re-rolling the window. No prompt is skipped either way.

Restoration stays enabled by default and for legacy configs that omit
the field. On a legacy (pre-frontier) checkpoint the option only skips
the restore, matching the previous cursor semantics.

The knob is declared in the exemplar YAML and the CheckpointingConfig
Attributes block, read with a None-tolerant .get (no call-site default),
and the restore block is extracted into
_maybe_restore_async_replay_buffer_checkpoint for testability. Docs:
async-grpo.md checkpointing section updated to describe frontier-aligned
saves, lossless restores, and the new option.

This supersedes the standalone load_replay_buffer change in #3583, which
skipped the buffered window on resume because the dataloader cursor
stayed advanced; here the window is regenerated instead.

Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Yi-Fu Wu <[email protected]>
Signed-off-by: Peter Jin <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant