-
Notifications
You must be signed in to change notification settings - Fork 100
[MAST] Commit qwen3_30b_a3b_mast.yaml #638
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
Draft
JenniferWang
wants to merge
2
commits into
main
Choose a base branch
from
add-mast-30b-moe-config
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| # Grouped Relative Policy Optimization (GRPO) | ||
| # >>> ./.meta/mast/launch.sh .meta/mast/qwen3_30b_a3b_mast.yaml | ||
| # WARNING: ======================================================================== | ||
| # WARNING: This setup is only tested for successfully kicking off the training loop. | ||
| # WARNING: ======================================================================== | ||
|
|
||
| # Global configuration | ||
| group_size: 4 | ||
| local_batch_size: 1 # per-device batch size | ||
| max_req_tokens: 1024 | ||
| max_res_tokens: 1024 | ||
| model: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| off_by_n: 1 # Off by one by default | ||
| launcher: mast | ||
|
|
||
| # Main loop configuration | ||
| rollout_threads: 32 # make this 4x the number of policy replicas seems to work well | ||
|
|
||
| # Observability configuration | ||
| metric_logging: | ||
| wandb: | ||
| entity: torchforge | ||
| project: grpo-training | ||
| group: grpo_exp_${oc.env:USER} | ||
| logging_mode: global_reduce # global_reduce, per_rank_reduce, per_rank_no_reduce | ||
| console: | ||
| logging_mode: global_reduce | ||
|
|
||
| # Dataset configuration | ||
| dataset: | ||
| path: /mnt/wsfuse/teamforge/hf/gsm8k | ||
| revision: "main" | ||
| data_split: "train" | ||
| streaming: true | ||
| model: ${model} | ||
|
|
||
| # Policy configuration | ||
| policy: | ||
| engine_args: # https://docs.vllm.ai/en/v0.10.0/api/vllm/engine/arg_utils.html#vllm.engine.arg_utils.EngineArgs | ||
| model: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| tensor_parallel_size: 4 | ||
| pipeline_parallel_size: 1 | ||
| enforce_eager: false | ||
| sampling_params: # https://docs.vllm.ai/en/v0.10.0/api/vllm/sampling_params.html#vllm.sampling_params.SamplingParams | ||
| n: ${group_size} | ||
| max_tokens: ${max_res_tokens} | ||
| temperature: 1.0 | ||
| top_p: 1.0 | ||
|
|
||
| # Trainer configuration | ||
| trainer: | ||
| model: | ||
| name: qwen3 | ||
| flavor: 30B-A3B | ||
| hf_assets_path: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| optimizer: | ||
| name: AdamW | ||
| lr: 1e-5 | ||
| eps: 1e-8 | ||
| lr_scheduler: | ||
| warmup_steps: 1 | ||
| training: | ||
| local_batch_size: ${local_batch_size} | ||
| seq_len: ${sum:${max_req_tokens},${max_res_tokens}} # seq_len >= max_req_tokens + max_res_tokens | ||
| max_norm: 1.0 | ||
| steps: 1000000 | ||
| dtype: bfloat16 | ||
| gc_freq: 1 | ||
| compile: | ||
| enable: false | ||
| parallelism: | ||
| data_parallel_replicate_degree: 1 | ||
| data_parallel_shard_degree: -1 | ||
| tensor_parallel_degree: 1 | ||
| pipeline_parallel_degree: 1 | ||
| context_parallel_degree: 1 | ||
| expert_parallel_degree: 1 | ||
| expert_tensor_parallel_degree: 1 | ||
| disable_loss_parallel: true | ||
| checkpoint: | ||
| enable: true | ||
| initial_load_path: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| initial_load_in_hf: true | ||
| folder: ${checkpoint_folder} | ||
| last_save_in_hf: true | ||
| interval: 500 | ||
| async_mode: "disabled" | ||
| activation_checkpoint: | ||
| mode: full | ||
| comm: | ||
| # 30B MoE model can require more time to load checkpoint than 1.7B's 1200s | ||
| init_timeout_seconds: 1800 | ||
| dcp_path: ${checkpoint_folder} | ||
|
|
||
| # Replay buffer configuration | ||
| replay_buffer: | ||
| batch_size: ${local_batch_size} | ||
| max_policy_age: ${off_by_n} | ||
| dp_size: ${actors.trainer.procs} | ||
|
|
||
| # Reference model configuration | ||
| ref_model: | ||
| model: | ||
| name: qwen3 | ||
| flavor: 30B-A3B | ||
| hf_assets_path: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| training: | ||
| seq_len: ${trainer.training.seq_len} | ||
| dtype: bfloat16 | ||
| gc_freq: 1 | ||
| compile: | ||
| enable: false | ||
| parallelism: | ||
| data_parallel_replicate_degree: 1 | ||
| data_parallel_shard_degree: -1 | ||
| tensor_parallel_degree: 1 | ||
| pipeline_parallel_degree: 1 | ||
| context_parallel_degree: 1 | ||
| expert_parallel_degree: 1 | ||
| checkpoint: | ||
| enable: true | ||
| initial_load_path: /mnt/wsfuse/teamforge/hf/qwen3_30b_a3b_2 | ||
| initial_load_in_hf: true | ||
| comm: | ||
| # Reference model also loads from checkpoint; so setting a higher timeout | ||
| init_timeout_seconds: 1800 | ||
|
|
||
| # All resource allocations | ||
| services: | ||
| policy: | ||
| procs: ${policy.engine_args.tensor_parallel_size} | ||
| num_replicas: 1 | ||
| hosts: 1 | ||
| with_gpus: true | ||
| mesh_name: policy | ||
| ref_model: | ||
| procs: 4 | ||
| num_replicas: 1 | ||
| hosts: 1 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also added a designated host for the ref model. |
||
| with_gpus: true | ||
| mesh_name: ref_model | ||
| reward_actor: | ||
| procs: 1 | ||
| num_replicas: 1 | ||
| with_gpus: false | ||
| mesh_name: reward_actor | ||
|
|
||
| actors: | ||
| dataset: | ||
| procs: 1 | ||
| with_gpus: false | ||
| mesh_name: dataset | ||
| trainer: | ||
| procs: 8 | ||
| hosts: 1 | ||
| with_gpus: true | ||
| mesh_name: trainer | ||
| replay_buffer: | ||
| procs: 1 | ||
| with_gpus: false | ||
| mesh_name: replay_buffer | ||
| compute_advantages: | ||
| procs: 1 | ||
| with_gpus: false | ||
| mesh_name: compute_advantages | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daniellepintz the main catch is there are two places loading the checkpoint and we need to loosen the timeout in both places.