"examples/pytorch/graphsage/negative_sampler.py" did not exist on "c18f957d0e078f799da5e44e4ac4251cb16b72d4"
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):
topk_weights=topk_weights,
forward_mode=forward_mode,
)
final_hidden_states *= self.routed_scaling_factor
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
......
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