We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb2d7c0 commit 51342f5Copy full SHA for 51342f5
1 file changed
fastdeploy/model_executor/models/deepseek_v3.py
@@ -1105,7 +1105,8 @@ def forward(
1105
residual: paddle.Tensor,
1106
):
1107
""" """
1108
- if hidden_states.shape[0] > 0:
+ need_do_attention = forward_meta.max_len_tensor_cpu[1] > 0 or forward_meta.max_len_tensor_cpu[2] > 0
1109
+ if hidden_states.shape[0] > 0 and need_do_attention:
1110
hidden_states, residual = self.input_layernorm(
1111
hidden_states, residual_input=residual, forward_meta=forward_meta
1112
)
0 commit comments