Unverified Commit 22bfed75 authored by Cheng Wan's avatar Cheng Wan Committed by GitHub
Browse files

[DeepSeekNextN] fix: residual of head norm can be None (#7398)

parent e879d8b7
...@@ -107,7 +107,11 @@ class DeepseekModelNextN(nn.Module): ...@@ -107,7 +107,11 @@ class DeepseekModelNextN(nn.Module):
) )
if not forward_batch.forward_mode.is_idle(): if not forward_batch.forward_mode.is_idle():
if residual is not None:
hidden_states, _ = self.shared_head.norm(hidden_states, residual) hidden_states, _ = self.shared_head.norm(hidden_states, residual)
else:
hidden_states = self.shared_head.norm(hidden_states)
return hidden_states return 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