Skip to content

Commit dd81c48

Browse files
committed
no token dispatcher
Signed-off-by: Malay Nagda <malayn@nvidia.com>
1 parent 08bc7a7 commit dd81c48

6 files changed

Lines changed: 11 additions & 26 deletions

File tree

‎scripts/performance/argument_parser.py‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -683,21 +683,13 @@ def parse_cli_args():
683683
help="Comma separated list of modules to recompute. Defaults to None",
684684
required=False,
685685
)
686-
performance_args.add_argument(
687-
"--moe_token_dispatcher_type",
688-
type=str,
689-
help="MoE token dispatcher type. Options- alltoall, flex. Defaults to None",
690-
choices=["alltoall", "flex", "allgather"],
691-
required=False,
692-
default=None,
693-
)
694686
performance_args.add_argument(
695687
"--moe_flex_dispatcher_backend",
696-
type=str,
688+
type=lambda x: None if x == "None" else x,
697689
help="MoE flex dispatcher backend. Options- deepep, hybridep. Defaults to None",
698-
choices=["deepep", "hybridep"],
690+
choices=["deepep", "hybridep", None],
699691
required=False,
700-
default=None,
692+
default=-1,
701693
)
702694

703695
# Logging

‎scripts/performance/configs/gpt_oss/gpt_oss_workload_base_configs.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
expert_tensor_parallel_size=1,
3636
global_batch_size=512,
3737
micro_batch_size=1,
38-
moe_token_dispatcher_type="alltoall",
3938
)
4039

4140

‎scripts/performance/configs/nemotronh/nemotronh_workload_base_configs.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
num_gpus=64,
3131
global_batch_size=192,
3232
cuda_graph_impl="transformer_engine",
33-
moe_token_dispatcher_type="alltoall",
3433
)
3534

3635

‎scripts/performance/configs/qwen/qwen3_workload_base_configs.py‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@
116116
expert_model_parallel_size=8,
117117
global_batch_size=1024,
118118
moe_a2a_overlap=False,
119-
moe_token_dispatcher_type="alltoall",
120119
)
121120

122121

@@ -127,7 +126,6 @@
127126
expert_model_parallel_size=8,
128127
global_batch_size=1024,
129128
moe_a2a_overlap=False,
130-
moe_token_dispatcher_type="alltoall",
131129
)
132130

133131

@@ -143,7 +141,6 @@
143141
expert_model_parallel_size=8,
144142
global_batch_size=1024,
145143
moe_a2a_overlap=False,
146-
moe_token_dispatcher_type="alltoall",
147144
)
148145

149146

@@ -154,7 +151,6 @@
154151
expert_model_parallel_size=8,
155152
global_batch_size=1024,
156153
moe_a2a_overlap=False,
157-
moe_token_dispatcher_type="alltoall",
158154
)
159155

160156

@@ -171,7 +167,6 @@
171167
expert_model_parallel_size=32,
172168
global_batch_size=2048,
173169
moe_a2a_overlap=True,
174-
moe_token_dispatcher_type="alltoall",
175170
)
176171

177172

@@ -184,7 +179,6 @@
184179
expert_model_parallel_size=32,
185180
global_batch_size=2048,
186181
moe_a2a_overlap=True,
187-
moe_token_dispatcher_type="alltoall",
188182
)
189183

190184

@@ -466,39 +460,41 @@
466460
num_gpus=128,
467461
expert_model_parallel_size=128,
468462
micro_batch_size=1,
469-
moe_token_dispatcher_type="alltoall",
470463
)
471464

472465
QWEN3_NEXT_80B_A3B_PRETRAIN_CONFIG_H100_BF16_V1 = replace(
473466
BASE_QWEN3_NEXT_80B_A3B_CONFIG,
474467
num_gpus=128,
475468
expert_model_parallel_size=128,
476469
micro_batch_size=1,
477-
moe_token_dispatcher_type="alltoall",
478470
)
479471

480472
QWEN3_NEXT_80B_A3B_PRETRAIN_CONFIG_B300_FP8_MX_V1 = replace(
481473
BASE_QWEN3_NEXT_80B_A3B_CONFIG,
482474
num_gpus=64,
483475
micro_batch_size=2,
476+
moe_flex_dispatcher_backend="deepep",
484477
)
485478

486479
QWEN3_NEXT_80B_A3B_PRETRAIN_CONFIG_B300_BF16_V1 = replace(
487480
BASE_QWEN3_NEXT_80B_A3B_CONFIG,
488481
num_gpus=64,
489482
micro_batch_size=1,
483+
moe_flex_dispatcher_backend="deepep",
490484
)
491485

492486
QWEN3_NEXT_80B_A3B_PRETRAIN_CONFIG_B200_FP8_MX_V1 = replace(
493487
BASE_QWEN3_NEXT_80B_A3B_CONFIG,
494488
num_gpus=64,
495489
micro_batch_size=1,
490+
moe_flex_dispatcher_backend="deepep",
496491
)
497492

498493
QWEN3_NEXT_80B_A3B_PRETRAIN_CONFIG_B200_BF16_V1 = replace(
499494
BASE_QWEN3_NEXT_80B_A3B_CONFIG,
500495
num_gpus=64,
501496
micro_batch_size=1,
497+
moe_flex_dispatcher_backend="deepep",
502498
)
503499

504500

‎scripts/performance/utils/overrides.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ def set_workload_base_configs(cfg: ConfigContainer, settings: WorkloadBaseConfig
222222
)
223223
_set_common_perf_overrides(cfg)
224224

225-
if settings.moe_token_dispatcher_type is not None:
226-
cfg.model.moe_token_dispatcher_type = settings.moe_token_dispatcher_type
227225
if settings.moe_flex_dispatcher_backend is not None:
228226
apply_flex_dispatcher_backend(cfg.model, settings.moe_flex_dispatcher_backend)
227+
else:
228+
cfg.model.moe_token_dispatcher_type = "alltoall"
229229

230230
return cfg
231231

@@ -434,10 +434,10 @@ def set_user_overrides(recipe: ConfigContainer, args: argparse.Namespace) -> Con
434434
if args.pytorch_profiler:
435435
recipe.logger.tensorboard_dir = "/nemo_run/pytorch_profile"
436436

437-
if args.moe_token_dispatcher_type is not None:
438-
recipe.model.moe_token_dispatcher_type = args.moe_token_dispatcher_type
439437
if args.moe_flex_dispatcher_backend is not None:
440438
apply_flex_dispatcher_backend(recipe.model, args.moe_flex_dispatcher_backend)
439+
else:
440+
recipe.model.moe_token_dispatcher_type = "alltoall"
441441

442442
return recipe
443443

‎scripts/performance/utils/utils.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class WorkloadBaseConfig:
5959

6060
# MoE configuration
6161
moe_flex_dispatcher_backend: Optional[str] = None
62-
moe_token_dispatcher_type: Optional[str] = None
6362
moe_a2a_overlap: Optional[bool] = False
6463
peft: Optional[str] = None
6564

0 commit comments

Comments
 (0)