Repository navigation
[megatron] feat: script of qwen3vl 235b - #3799
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an example script to run PPO training for the qwen3_vl-235b-megatron model. The script configures a multi-node, multi-GPU training job with a large number of parameters for the verl.trainer.main_ppo script. My review identifies a critical issue in the parallelism configuration that would prevent the script from running successfully on the specified hardware. I've provided a suggestion to correct the parallelism settings.
| actor_rollout_ref.actor.megatron.tensor_model_parallel_size=4 \ | ||
| actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=8 \ | ||
| actor_rollout_ref.actor.megatron.expert_model_parallel_size=8 \ |
There was a problem hiding this comment.
The current parallelism configuration for the actor model is invalid for the specified hardware. With trainer.n_gpus_per_node=8 and trainer.nnodes=8 (lines 79-80), the total number of GPUs is 64.
The Megatron-LM parallelism requires the data parallel size (DP) to be divisible by the expert parallel size (EP). The data parallel size is calculated as DP = total_gpus / (TP * PP).
With the current settings:
tensor_model_parallel_size(TP) = 4pipeline_model_parallel_size(PP) = 8expert_model_parallel_size(EP) = 8
The data parallel size would be DP = 64 / (4 * 8) = 2.
The constraint DP % EP == 0 becomes 2 % 8 == 0, which is false. This will cause the training to fail.
To fix this, you could adjust the parallelism settings. For a large MoE model on 64 GPUs, a configuration that increases data parallelism to accommodate more expert parallelism might be more suitable. For example:
actor_rollout_ref.actor.megatron.tensor_model_parallel_size=2 \
actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=4 \
actor_rollout_ref.actor.megatron.expert_model_parallel_size=8 \This configuration results in DP = 64 / (2 * 4) = 8, which satisfies the 8 % 8 == 0 constraint.
| actor_rollout_ref.actor.megatron.tensor_model_parallel_size=4 \ | |
| actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=8 \ | |
| actor_rollout_ref.actor.megatron.expert_model_parallel_size=8 \ | |
| actor_rollout_ref.actor.megatron.tensor_model_parallel_size=2 \ | |
| actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=4 \ | |
| actor_rollout_ref.actor.megatron.expert_model_parallel_size=8 \ |
an example script
an example script
an example script
an example script
an example script
an example script
an example script
an example script
an example script
an example script