mirror of
https://git.datalinker.icu/deepseek-ai/DeepSeek-V3.git
synced 2026-03-16 10:07:14 +08:00
Merge 3421621d7b31fe632bdf1f1771f2ccbac705027c into 9b4e9788e4a3a731f7567338ed15d3ec549ce03b
This commit is contained in:
commit
6bc0d0eb02
@ -682,7 +682,7 @@ class MoE(nn.Module):
|
||||
y = torch.zeros_like(x)
|
||||
counts = torch.bincount(indices.flatten(), minlength=self.n_routed_experts).tolist()
|
||||
for i in range(self.experts_start_idx, self.experts_end_idx):
|
||||
if counts[i] == 0:
|
||||
if counts[i] == 0 or self.experts[i] is None:
|
||||
continue
|
||||
expert = self.experts[i]
|
||||
idx, top = torch.where(indices == i)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user