Skip to content

Commit

Permalink
Fix bug for GaudiMixtralAttentionLongSequence forward (#1650)
Browse files Browse the repository at this point in the history
Signed-off-by: kaixuanliu <[email protected]>
  • Loading branch information
kaixuanliu authored Dec 25, 2024
1 parent a6ee7c2 commit 780c9d8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ def forward(q, k, v, mask, causal, q_block_size):
s, e = i * q_block_size, (i + 1) * q_block_size
row_q = q[:, :, s:e, :]
row_mask = mask[:, :, s:e, :]
row_o = attn_output[:, :, s:e, :]
row_o.fill_(FusedSDPA.apply(row_q, k, v, row_mask, 0.0, causal, None))
attn_output[:, :, s:e, :] = FusedSDPA.apply(row_q, k, v, row_mask, 0.0, causal, None)

if q_padding != 0:
attn_output = attn_output[:, :, :-q_padding, :]
Expand Down

0 comments on commit 780c9d8

Please sign in to comment.