Skip to content

Add num_generators field to RLTrainer.Config - #3624

Merged
pzhan9 merged 2 commits into
pytorch:mainfrom
pzhan9:num-generator-main
Jun 15, 2026
Merged

pzhan9 merged 2 commits into
pytorch:mainfrom
pzhan9:num-generator-main

Conversation

@pzhan9

@pzhan9 pzhan9 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

GeneratorRouter was added in #3583, but we currently do not have a way to spawn multiple generators. Subsequently router cannot be tested in CI with an integration test.

In order to unblock, this PR adds a num_generators field to RLTrainer.Config. This field can only be used in the single-host mode.

This field is meant to be temporary just to unblock the integration test (suggested by this comment). For the long run, we need to have a "placement" config, which contains the information regarding how to map gpus/hosts to different RL roles, such as trainer and generators. The num_generators should be there too. Hopefully we can get that done in the next few weeks.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 10, 2026
],
"RL GRPO 2 generators TP=1 no compile",
"rl_grpo_2gen_tp1_no_compile",
ngpu=4,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this 8 GPU, and use trainer 4, 2 generator each TP2. Seems fine to land this first, with TODO

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would do 3 generator TP2. Rollout is the bottleneck

@pzhan9
pzhan9 force-pushed the num-generator-main branch from 723cd1a to 04100b7 Compare June 11, 2026 17:24
@pzhan9
pzhan9 requested review from fegin and wconstab as code owners June 11, 2026 17:24

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should update 4gpu one to use 8gpu, instead of creating a new yaml.

#3142 is doing so, maybe easier to rebase after it lands.

@pzhan9 pzhan9 Jun 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tianyu-l Another reason I added a new workflow for this test is, the new tests is adding another 15-20mins to the test time, and pushed the overall test time over the 45 minute timeout.

Q: is it okay to bump the timeout from 45min to 60min?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, I would suggest we delete / repurpose some existing tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made the existing rl_grpo_tp2_no_compile use 3 generators.

@pzhan9
pzhan9 force-pushed the num-generator-main branch from 690ca8e to dda80aa Compare June 15, 2026 19:03
@pzhan9
pzhan9 force-pushed the num-generator-main branch from dda80aa to 4453a4d Compare June 15, 2026 19:06
@pzhan9
pzhan9 merged commit a9a136b into pytorch:main Jun 15, 2026
9 of 12 checks passed
@pzhan9
pzhan9 deleted the num-generator-main branch June 15, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/rl ciflow/8gpu CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants