-
Notifications
You must be signed in to change notification settings - Fork 551
feat(ppo): support async ppo #3410
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 all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
46a2615
feat(ppo): support non-colocated generation
bg51717 43524ee
test(ppo): add non-colocated e2e recipe
bg51717 8d36cfb
chore(ppo): remove redundant colocated config comments
bg51717 1b9ddf6
fix(ppo): harden non-colocated training flow
bg51717 143bc88
test(ppo): expand non-colocated coverage
bg51717 185c18a
chore: merge upstream/main into feat/ppo-noncolocated-clean
bg51717 83dffc8
chore(ppo): clarify non-colocated refit offload
bg51717 4fe31a4
Merge remote-tracking branch 'upstream/main' into feat/ppo-noncolocat…
bg51717 5910124
test(ppo): reduce non-colocated nightly timeout
bg51717 7d6454b
feat(ppo): add asynchronous PPO training
bg51717 ee04f8e
feat(ppo): bank rollouts during critic warmup
bg51717 f47035c
fix(ppo): harden async training failure handling
bg51717 49255c9
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 bde5407
test(ppo): fix async test configurations
bg51717 202cfd6
Merge upstream/main into feat/ppo-async-clean
bg51717 e9f3b21
fix(ppo): define multi-dataloader config default
bg51717 b8776c9
test(ppo): add async PPO nightlies
bg51717 602ec64
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 d7e1355
fix(ppo): harden async PPO startup and actor setup
bg51717 0b90178
Merge upstream/main into feat/ppo-async-clean
bg51717 4403ab2
fix(ppo): narrow collector config for gym helper
bg51717 e93a42f
refactor(ppo): migrate PPOConfig to BaseModel
bg51717 ba6cb5a
test(ppo): align critic loss checks
bg51717 3312af2
Merge upstream/main into feat/ppo-async-clean
bg51717 2fb2ff6
fix(ppo): align async configuration handling
bg51717 7228d7e
test(ppo): cover async training invariants
bg51717 cb664c5
test(ppo): streamline async functional coverage
bg51717 0c83974
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 700b032
fix(ppo): align async rollout lifecycle
bg51717 3099536
test(ppo): address async review coverage
bg51717 df3dc15
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 bac4a8c
fix(ppo): checkpoint async replay state in actor
bg51717 80edfcb
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 20835de
fix(async): require explicit replay restore behavior
bg51717 aac7eed
fix(async): align runtime configuration semantics
bg51717 0a1f246
fix(ppo): align async configuration defaults
bg51717 6e0362d
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 ee6f849
Merge remote-tracking branch 'upstream/main' into feat/ppo-async-clean
bg51717 9182c74
fix(ppo): align async configuration and restore behavior
bg51717 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
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
67 changes: 67 additions & 0 deletions
67
examples/configs/recipes/llm/ppo-qwen2.5-1.5b-gsm8k-1n8g-automodel-noncolocated-async.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,67 @@ | ||
| defaults: ../../ppo_math_1B.yaml | ||
|
yuki-97 marked this conversation as resolved.
|
||
| ppo: | ||
| num_prompts_per_step: 1024 | ||
| num_generations_per_prompt: 1 | ||
| # Async PPO cycles the dataloader and stops via max_num_steps. | ||
| max_num_epochs: -1 | ||
| ppo_epochs: 1 | ||
| policy_training_start_step: 5 | ||
| val_period: 1 | ||
| overlong_filtering: true | ||
| async_ppo: | ||
| enabled: true | ||
|
yuki-97 marked this conversation as resolved.
|
||
| warmup_generation_lead_steps: 2 | ||
| in_flight_weight_updates: true | ||
| reward_shaping: | ||
| enabled: false | ||
| adv_estimator: | ||
| gae_lambda_value: 1.0 | ||
| gae_lambda_policy: 1 | ||
| reward_scaling: | ||
| enabled: false | ||
| loss_fn: | ||
| ratio_clip_max: 0.2 | ||
| ratio_clip_c: 3 | ||
| use_importance_sampling_correction: true | ||
| value_loss_fn: | ||
| scale: 1.0 | ||
| cliprange: 0.5 | ||
| checkpointing: | ||
| checkpoint_dir: results/ppo-qwen2.5-1.5b-gsm8k-1n8g-automodel-noncolocated-async | ||
| policy: | ||
| model_name: Qwen/Qwen2.5-1.5B-Instruct | ||
| train_global_batch_size: 256 | ||
| max_total_sequence_length: 1024 | ||
| generation: | ||
| max_new_tokens: 512 | ||
| vllm_cfg: | ||
| async_engine: true | ||
| gpu_memory_utilization: 0.4 | ||
| max_model_len: 1024 | ||
| colocated: | ||
| enabled: false | ||
| resources: | ||
| gpus_per_node: 4 | ||
| value: | ||
| model_name: Qwen/Qwen2.5-1.5B-Instruct | ||
| train_micro_batch_size: 4 | ||
| data: | ||
| max_input_seq_length: 512 | ||
| train: | ||
| dataset_name: gsm8k | ||
| split: train | ||
| validation: | ||
| dataset_name: gsm8k | ||
| split: test | ||
| default: | ||
| system_prompt_file: examples/prompts/gsm8k.txt | ||
| env: | ||
| math: | ||
| math_verify_impl: hf_math_verify | ||
| logger: | ||
| log_dir: logs/ppo-qwen2.5-1.5b-gsm8k-1n8g-automodel-noncolocated-async | ||
| wandb: | ||
| project: nemo-rl | ||
| name: ppo-qwen2.5-1.5b-gsm8k-1n8g-automodel-noncolocated-async | ||
| cluster: | ||
| gpus_per_node: 8 | ||
89 changes: 89 additions & 0 deletions
89
...ipes/llm/ppo-qwen2.5-1.5b-gsm8k-2n8g-megatron-valuetp2sp-dynbatch-noncolocated-async.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,89 @@ | ||
| defaults: ../../ppo_math_1B_megatron.yaml | ||
| ppo: | ||
| num_prompts_per_step: 1024 | ||
| num_generations_per_prompt: 1 | ||
| # Async PPO cycles the dataloader and stops via max_num_steps. | ||
| max_num_epochs: -1 | ||
| ppo_epochs: 1 | ||
| val_period: 1 | ||
| overlong_filtering: true | ||
| async_ppo: | ||
| enabled: true | ||
| in_flight_weight_updates: true | ||
| reward_shaping: | ||
| enabled: false | ||
| adv_estimator: | ||
| gae_lambda_value: 1.0 | ||
| gae_lambda_policy: 1 | ||
| reward_scaling: | ||
| enabled: false | ||
| loss_fn: | ||
| ratio_clip_max: 0.2 | ||
| ratio_clip_c: 3 | ||
| use_importance_sampling_correction: true | ||
| value_loss_fn: | ||
| scale: 1.0 | ||
| cliprange: 0.5 | ||
| checkpointing: | ||
| checkpoint_dir: results/ppo-qwen2.5-1.5b-gsm8k-2n8g-megatron-valuetp2sp-dynbatch-noncolocated-async | ||
| policy: | ||
| model_name: Qwen/Qwen2.5-1.5B-Instruct | ||
| train_global_batch_size: 256 | ||
| max_total_sequence_length: 1024 | ||
| megatron_cfg: | ||
| tensor_model_parallel_size: 2 | ||
| context_parallel_size: 2 | ||
| sequence_parallel: true | ||
| optimizer: | ||
| weight_decay: 0.01 | ||
| scheduler: | ||
| start_weight_decay: 0.01 | ||
| end_weight_decay: 0.01 | ||
| lr_warmup_iters: 0 | ||
| lr_warmup_init: 0 | ||
| make_sequence_length_divisible_by: 8 | ||
| generation: | ||
| max_new_tokens: 512 | ||
| colocated: | ||
| enabled: false | ||
| resources: | ||
| gpus_per_node: 8 | ||
| num_nodes: 1 | ||
| vllm_cfg: | ||
| async_engine: true | ||
| gpu_memory_utilization: 0.4 | ||
| max_model_len: 1024 | ||
| value: | ||
| model_name: Qwen/Qwen2.5-1.5B-Instruct | ||
| train_micro_batch_size: 4 | ||
| megatron_cfg: | ||
| tensor_model_parallel_size: 2 | ||
| sequence_parallel: true | ||
| optimizer: | ||
| lr: 1.0e-05 | ||
| weight_decay: 0.01 | ||
| scheduler: | ||
| lr_warmup_iters: 0 | ||
| dynamic_batching: | ||
| enabled: true | ||
| data: | ||
| max_input_seq_length: 512 | ||
| train: | ||
| dataset_name: gsm8k | ||
| split: train | ||
| validation: | ||
| dataset_name: gsm8k | ||
| split: test | ||
| default: | ||
| system_prompt_file: examples/prompts/gsm8k.txt | ||
| env: | ||
| math: | ||
| math_verify_impl: hf_math_verify | ||
| logger: | ||
| log_dir: logs/ppo-qwen2.5-1.5b-gsm8k-2n8g-megatron-valuetp2sp-dynbatch-noncolocated-async | ||
| wandb: | ||
| project: nemo-rl | ||
| name: ppo-qwen2.5-1.5b-gsm8k-2n8g-megatron-valuetp2sp-dynbatch-noncolocated-async | ||
| cluster: | ||
| num_nodes: 2 | ||
| gpus_per_node: 8 |
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.