Skip to content

Commit

Permalink
fix bug for flash attention (EleutherAI#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcli committed May 9, 2023
1 parent befd133 commit dc05783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion megatron/model/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def flash_attention(self, query_layer, key_layer, value_layer):
else:

# [sq, b, np, hn] -> [b * sq, 1, np, hn]
query_layer.transpose(0, 1).reshape(
query_layer = query_layer.transpose(0, 1).reshape(
output_size[0] * output_size[2], 1, output_size[1], -1
)

Expand Down

0 comments on commit dc05783

Please sign in to comment.