Skip to content

feat: generalize run_rollout_only.py into a single-controller simulator #4860

Open

Description

@yuki-97

Background

#4814 adds examples/run_rollout_only.py, which runs a GRPO recipe's rollouts exactly as training would, without creating a trainer. A training stand-in holds each step where policy.train() would run, and the weight version advances through the refit calls without moving any weights. This covers the rollout-only case on both the sync and async paths.

Proposal

Build on that driver and evolve it into examples/run_single_controller_simulator.py. In the simulator, each side of the training loop is a pluggable backend, and any combination of the two can run:

  • Train backend
    • automodel
    • mcore
    • cpu: a mock that stands in for the train step and refit and uses no GPU resources
  • Rollout backend
    • any of the existing generation backends
    • cpu: a mock that returns synthetic rollouts and uses no GPU resources
  • Modes

Because either side can be swapped for the cpu mock, one side can be run, profiled and tuned on its own, with the same config and step loop as the full run, and without allocating GPUs for the other side.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions