Skip to content

Commit a7fc503

Browse files
authored
fix
1 parent 72c61e6 commit a7fc503

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

lightllm/common/basemodel/layer_weights/meta_weights/fused_moe_weight_tp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def experts(self, input_tensor, router_logits, top_k, renormalize, use_grouped_t
6767
topk_group=topk_group,
6868
num_expert_group=num_expert_group,
6969
scoring_func=self.scoring_func,
70-
num_fused_shared_experts=self.num_fused_shared_experts,
7170
)
7271
if self.num_fused_shared_experts > 0:
7372
topk_ids[:, -1] = self.n_routed_experts - 1

lightllm/common/fused_moe/grouped_topk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ def triton_grouped_topk(
208208
topk_group: int = 0,
209209
scoring_func: str = "softmax",
210210
group_score_used_topk_num=2,
211-
num_fused_shared_experts: int = 0,
212211
):
213212

214213
if correction_bias is not None:
@@ -223,8 +222,8 @@ def triton_grouped_topk(
223222
dtype = torch.float32
224223

225224
scores_buffer = torch.empty((token_num, total_expert_num), dtype=dtype, device="cuda")
226-
out_topk_weights = torch.empty((token_num, topk + num_fused_shared_experts), dtype=torch.float32, device="cuda")
227-
out_topk_ids = torch.empty((token_num, topk + num_fused_shared_experts), dtype=torch.long, device="cuda")
225+
out_topk_weights = torch.empty((token_num, topk), dtype=torch.float32, device="cuda")
226+
out_topk_ids = torch.empty((token_num, topk), dtype=torch.long, device="cuda")
228227

229228
assert total_expert_num % num_expert_group == 0
230229

lightllm/common/fused_moe/topk_select.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ def select_experts(
175175
num_expert_group: Optional[int] = None,
176176
scoring_func: str = "softmax",
177177
custom_routing_function: Optional[Callable] = None,
178-
num_fused_shared_experts: int = 0,
179178
):
180179
from lightllm.common.fused_moe.topk_select import fused_topk
181180
from lightllm.common.fused_moe.grouped_topk import triton_grouped_topk
@@ -211,7 +210,6 @@ def select_experts(
211210
topk_group=topk_group,
212211
scoring_func=scoring_func,
213212
group_score_used_topk_num=group_score_topk_num,
214-
num_fused_shared_experts=num_fused_shared_experts,
215213
)
216214

217215
elif custom_routing_function is None:

0 commit comments

Comments
 (0)