Update modeling_deepseek.py
Browse files- modeling_deepseek.py +1 -1
modeling_deepseek.py
CHANGED
@@ -432,7 +432,7 @@ class MoEGate(nn.Module):
|
|
432 |
|
433 |
### select top-k experts
|
434 |
if self.topk_method == "noaux_tc":
|
435 |
-
assert not self.training
|
436 |
scores_for_choice = scores.view(bsz * seq_len, -1) + self.e_score_correction_bias.unsqueeze(0)
|
437 |
group_scores = (
|
438 |
scores_for_choice.view(bsz * seq_len, self.n_group, -1).topk(2, dim=-1)[0].sum(dim = -1)
|
|
|
432 |
|
433 |
### select top-k experts
|
434 |
if self.topk_method == "noaux_tc":
|
435 |
+
# assert not self.training
|
436 |
scores_for_choice = scores.view(bsz * seq_len, -1) + self.e_score_correction_bias.unsqueeze(0)
|
437 |
group_scores = (
|
438 |
scores_for_choice.view(bsz * seq_len, self.n_group, -1).topk(2, dim=-1)[0].sum(dim = -1)
|