Repository navigation
feat(sc): support non-colocated MInf #3727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6b0cdca
feat(sc): support non-colocated MInf
tdene 28c0593
Address PR team review
tdene c9c667a
Cleanup
tdene 6e49356
Address reviewer comments
tdene a3c94e9
Merge branch 'main' into tde/sc_megatron_generation
tdene 28218a6
Refactor recompute logic
tdene d3602a3
Address reviewer comments
tdene f2b9a30
Merge branch 'main' into tde/sc_megatron_generation
tdene e322324
Use example as part of CI
tdene a032e95
Add nightly test
tdene 3460091
Merge branch 'main' into tde/sc_megatron_generation
tdene 0661efd
lint
tdene a5e2d67
fix(megatron): hotfix disable offending tests
tdene ae5c741
run the megatron async-gym functional during LFast
tdene c81afd6
test: temporarily run the SC sync math nightlies on GB200
tdene 0d3bf0c
Merge branch 'main' into tde/sc_megatron_generation
tdene 61f1e2a
Address reviewer comments
tdene 44c13e6
Topology fix
tdene 898964c
Merge branch 'main' into tde/sc_megatron_generation
tdene 0cc133c
Replace _build_trainer_then_megatron_generation
tdene 83889d5
Fix tests
tdene c3837b7
Fix NCCL refit TP=1 issue
tdene df3df79
Revert temporary test changes
tdene f2fc2e8
Expand comment
tdene 399a162
Merge remote-tracking branch 'origin/main' into tde/sc_megatron_gener…
tdene File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
examples/nemo_gym/grpo_qwen3_0_6b_megatron_generation_single_controller.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # GRPO on the NeMo-Gym workplace-assistant environment via the SingleController path, | ||
| # using non-colocated Megatron Inference. | ||
| # Gym rollouts go through the persistent Megatron engine's OpenAI-compatible server, | ||
| # Smoke-test scale; Qwen3-0.6B on one node with 2 GPUs (1 training + 1 generation); | ||
| # the CI-run variant of this setup is | ||
| # tests/functional/grpo_megatron_generation_gym_single_controller.sh. | ||
|
yuki-97 marked this conversation as resolved.
Resolved
|
||
| defaults: "grpo_qwen3_30ba3b_instruct.yaml" | ||
|
yuki-97 marked this conversation as resolved.
Resolved
|
||
|
|
||
| grpo: | ||
| # SC requires one optimizer step per RL step: | ||
| # num_prompts_per_step * num_generations_per_prompt == policy.train_global_batch_size | ||
| num_prompts_per_step: 4 | ||
| num_generations_per_prompt: 2 | ||
| max_num_steps: 10 # short demo; raise for a real run | ||
| # SC does not support validation yet (setup raises when it is enabled). | ||
| val_period: 0 | ||
| val_at_start: false | ||
| # SC replaces the legacy async-GRPO path. | ||
| async_grpo: null | ||
|
|
||
| policy: | ||
| model_name: Qwen/Qwen3-0.6B | ||
| train_global_batch_size: 8 | ||
| # Full workplace-assistant prompts (all tools attached) run past 4k tokens. | ||
| max_total_sequence_length: 8192 | ||
|
|
||
| megatron_cfg: | ||
| tensor_model_parallel_size: 1 | ||
| expert_model_parallel_size: 1 | ||
| context_parallel_size: 1 | ||
| sequence_parallel: false | ||
|
|
||
| generation: | ||
| backend: "megatron" | ||
| mcore_generation_config: | ||
| # NeMo-Gym drives rollouts through the engine's OpenAI server. | ||
| expose_http_server: true | ||
| colocated: | ||
| enabled: false | ||
| resources: | ||
| num_nodes: 1 | ||
| gpus_per_node: 1 | ||
|
|
||
| # The gym family sets no data_plane block, so the full one is spelled out here | ||
| # (values as documented in examples/configs/grpo_math_1B.yaml). | ||
| data_plane: | ||
| enabled: true | ||
| impl: transfer_queue | ||
| backend: "simple" # TQ storage backend ('simple' or 'mooncake_cpu') | ||
| storage_capacity: 1000000 # max samples retained per partition | ||
| num_storage_units: 2 # storage shards | ||
| claim_meta_poll_interval_s: 0.5 # blocking-claim poll cadence | ||
| global_segment_size: 549755813888 # 512 GiB — used when backend == "mooncake_cpu" | ||
| local_buffer_size: 68719476736 # 64 GiB — used when backend == "mooncake_cpu" | ||
|
yuki-97 marked this conversation as resolved.
Resolved
|
||
|
|
||
| async_rl: | ||
| sampler: | ||
| name: in_order | ||
| # 0 = fully synchronous. No off-policy data is admitted, so the inherited | ||
| # use_importance_sampling_correction=false stays valid. | ||
| max_lookahead_versions: 0 | ||
| min_groups_for_streaming_train: ${grpo.num_prompts_per_step} | ||
| max_inflight_prompts: ${grpo.num_prompts_per_step} | ||
|
|
||
| checkpointing: | ||
| # SC does not support checkpointing yet (setup raises when it is enabled). | ||
|
yuki-97 marked this conversation as resolved.
Resolved
|
||
| enabled: false | ||
|
|
||
| cluster: | ||
| gpus_per_node: 2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.