tonyshark commited on
Commit
a5c01c3
·
verified ·
1 Parent(s): c2f63bd

Upload modeling_deepseek.py

Browse files
Files changed (1) hide show
  1. modeling_deepseek.py +2 -2
modeling_deepseek.py CHANGED
@@ -530,8 +530,8 @@ class DeepseekV3MoE(nn.Module):
530
  y = self.moe_infer(hidden_states, topk_idx, topk_weight).view(*orig_shape)
531
  # if self.config.n_shared_experts is not None:
532
  # y = y + self.shared_experts(identity)
533
- return y
534
-
535
  @torch.no_grad()
536
  def moe_infer(self, x, topk_ids, topk_weight):
537
  cnts = topk_ids.new_zeros((topk_ids.shape[0], len(self.experts)))
 
530
  y = self.moe_infer(hidden_states, topk_idx, topk_weight).view(*orig_shape)
531
  # if self.config.n_shared_experts is not None:
532
  # y = y + self.shared_experts(identity)
533
+ return y
534
+ return 0
535
  @torch.no_grad()
536
  def moe_infer(self, x, topk_ids, topk_weight):
537
  cnts = topk_ids.new_zeros((topk_ids.shape[0], len(self.experts)))