4646)
4747from nemo .collections .nlp .modules .common .tokenizer_utils import get_nmt_tokenizer
4848from nemo .lightning import AutoResume , NeMoLogger
49- from nemo .lightning .pytorch .callbacks .deepep import DeepEPCallback
5049from nemo .lightning .pytorch .callbacks .flops_callback import FLOPsMeasurementCallback
5150from nemo .lightning .pytorch .callbacks .garbage_collection import GarbageCollectionCallback
5251from nemo .lightning .pytorch .callbacks .megatron_comm_overlap import MegatronCommOverlapCallback
5655from nemo .utils .exp_manager import TimingCallback
5756
5857
59- def set_deepep_params (recipe ):
60- enable_deepep = os .getenv ("CLOUDAI_ENABLE_DEEPEP" , "0" ) == "1"
61- if enable_deepep :
62- print ("INFO: CLOUDAI_ENABLE_DEEPEP is set. Applying DeepEP model configs." )
63- recipe .trainer .callbacks .append (run .Config (DeepEPCallback ))
64- recipe .trainer .callbacks [- 1 ].moe_expert_capacity_factor = - 1.0
65- recipe .trainer .callbacks [- 1 ].moe_pad_expert_input_to_capacity = False
66- recipe .model .config .moe_router_dtype = "fp32"
67-
68-
6958def set_enable_cuda_graphs_params (recipe ):
7059 enable_cuda_graphs = os .getenv ("CLOUDAI_ENABLE_CUDA_GRAPHS" , "0" ) == "1"
7160 if enable_cuda_graphs :
@@ -669,8 +658,6 @@ def cloudai_llama4_scout_recipe() -> run.Partial:
669658
670659 # Check if enabling cuda graphs
671660 set_enable_cuda_graphs_params (recipe )
672- # Check if enabling DeepEP
673- set_deepep_params (recipe )
674661
675662 return recipe
676663
@@ -696,8 +683,6 @@ def cloudai_llama4_maverick_recipe() -> run.Partial:
696683
697684 # Check if enabling cuda graphs
698685 set_enable_cuda_graphs_params (recipe )
699- # Check if enabling DeepEP
700- set_deepep_params (recipe )
701686
702687 return recipe
703688
0 commit comments