@@ -549,19 +549,32 @@ def moonlight_16b_sft_8gpu_h100_bf16_tp1_config() -> ConfigContainer:
549549 cfg .mixed_precision .grad_reduce_in_fp32 = False
550550 cfg .ddp .grad_reduce_in_fp32 = False
551551
552- # Plain all-to-all is the correctness-first single-node EP8 path. Clear
553- # inactive flex-dispatcher settings so the execution fingerprint is exact.
554- cfg .model .moe_token_dispatcher_type = "alltoall"
555- cfg .model .moe_flex_dispatcher_backend = None
552+ # Reuse the tuned single-node HybridEP transport and expert-communication
553+ # overlap from the bounded pretraining topology.
554+ cfg .model .moe_token_dispatcher_type = "flex"
555+ cfg .model .moe_flex_dispatcher_backend = "hybridep"
556+ cfg .model .moe_deepep_num_sms = None
556557 cfg .model .moe_hybridep_num_sms = None
557- cfg .model .moe_flex_dispatcher_num_sms = None
558+ cfg .model .moe_flex_dispatcher_num_sms = 32
558559 cfg .model .moe_a2a_overlap = False
559560 cfg .model .moe_shared_expert_overlap = False
560- cfg .comm_overlap = None
561+ cfg .model .high_priority_a2a_comm_stream = True
562+ cfg .comm_overlap = CommOverlapConfig (
563+ tp_comm_overlap = False ,
564+ overlap_moe_expert_parallel_comm = True ,
565+ delay_wgrad_compute = True ,
566+ )
561567
562568 # Keep the complete process environment visible on the recipe.
563569 cfg .env_vars = {
564570 ** COMMON_RECIPE_ENV_VARS ,
571+ "CUDA_DEVICE_MAX_CONNECTIONS" : 32 ,
572+ "NUM_OF_HYBRID_EP_RANKS_PER_NVLINK_DOMAIN" : 8 ,
573+ "NUM_OF_TOKENS_PER_CHUNK_COMBINE_API" : 128 ,
574+ "NVLINK_DOMAIN_SIZE" : 8 ,
575+ "NVTE_BWD_LAYERNORM_SM_MARGIN" : 20 ,
576+ "NVTE_FWD_LAYERNORM_SM_MARGIN" : 20 ,
577+ "USE_MNNVL" : 0 ,
565578 }
566579 return cfg
567580
0 commit comments