"src/vscode:/vscode.git/clone" did not exist on "dc86bd421ed98777112c64f61940321631c11806"
Unverified Commit de1350ea authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Minor remove one kernel for DeepSeek (#6977)

parent 86fe943b
...@@ -421,10 +421,13 @@ class DeepseekV2MoE(nn.Module): ...@@ -421,10 +421,13 @@ class DeepseekV2MoE(nn.Module):
topk_weights=topk_weights, topk_weights=topk_weights,
forward_mode=forward_mode, forward_mode=forward_mode,
) )
final_hidden_states *= self.routed_scaling_factor
if shared_output is not None: if shared_output is not None:
final_hidden_states = final_hidden_states + shared_output x = shared_output
x.add_(final_hidden_states, alpha=self.routed_scaling_factor)
final_hidden_states = x
else:
final_hidden_states *= self.routed_scaling_factor
return final_hidden_states return final_hidden_states
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment