Skip to content

Commit 0c2633d

Browse files
authored
Merge pull request #712 from aahouzi/minor-fix
Remove DeepEP callback for llama4
2 parents 71dfd89 + 7d6da43 commit 0c2633d

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/cloudai/workloads/nemo_run/cloudai_nemorun.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
)
4747
from nemo.collections.nlp.modules.common.tokenizer_utils import get_nmt_tokenizer
4848
from nemo.lightning import AutoResume, NeMoLogger
49-
from nemo.lightning.pytorch.callbacks.deepep import DeepEPCallback
5049
from nemo.lightning.pytorch.callbacks.flops_callback import FLOPsMeasurementCallback
5150
from nemo.lightning.pytorch.callbacks.garbage_collection import GarbageCollectionCallback
5251
from nemo.lightning.pytorch.callbacks.megatron_comm_overlap import MegatronCommOverlapCallback
@@ -56,16 +55,6 @@
5655
from 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-
6958
def 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

Comments
 (0)