diff --git a/python/sglang/srt/eplb/expert_location.py b/python/sglang/srt/eplb/expert_location.py index 0fdff48fe9c8..66995ae62fee 100644 --- a/python/sglang/srt/eplb/expert_location.py +++ b/python/sglang/srt/eplb/expert_location.py @@ -93,7 +93,6 @@ def init_trivial( if common is None: return None - num_physical_experts = common["num_physical_experts"] model_config_for_expert_location = common["model_config_for_expert_location"] num_layers = model_config_for_expert_location.num_layers @@ -103,7 +102,6 @@ def init_trivial( torch.arange(0, num_physical_experts).repeat(num_layers, 1) % num_logical_experts ) - return ExpertLocationMetadata.init_by_mapping( server_args, model_config, @@ -135,7 +133,6 @@ def init_by_mapping( ep_size=common["ep_size"], moe_ep_rank=moe_ep_rank, ) - return ExpertLocationMetadata._init_raw( server_args=server_args, ep_size=common["ep_size"], @@ -229,7 +226,6 @@ def _init_raw( logical_to_all_physical_map_num_valid = torch.count_nonzero( logical_to_all_physical_map != -1, dim=-1 ) - return ExpertLocationMetadata( physical_to_logical_map=physical_to_logical_map, physical_to_logical_map_cpu=physical_to_logical_map.cpu(), @@ -333,7 +329,6 @@ def _compute_logical_to_all_physical_map( logical_to_all_physical_map[layer_id][logical_expert_id].append( physical_expert_id ) - # Replace by the physical expert on local GPU or node if possible if moe_ep_rank is not None: num_gpus_per_node = server_args.ep_size // server_args.nnodes