Skip to content

Commit

Permalink
Fix by replacing view with reshape
Browse files Browse the repository at this point in the history
  • Loading branch information
li-yi-dong committed Sep 12, 2023
1 parent 827c3e1 commit 4da868f
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 @@ -312,7 312,7 @@ def forward(self, query_layer, key_layer,
value_layer.size(3))

# change view [sk, b * np, hn]
value_layer = value_layer.view(value_layer.size(0),
value_layer = value_layer.reshape(value_layer.size(0),
output_size[0] * output_size[1], -1)

# change view [b * np, sq, sk]
Expand Down

0 comments on commit 4da868f

Please sign in to comment.