Skip to content

Commit

Permalink
def kv_seq_len
Browse files Browse the repository at this point in the history
  • Loading branch information
DongHande authored Oct 9, 2023
1 parent 34b7ab1 commit ae73232
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/bettertransformer/models/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ def gpt_bigcode_wrapped_scaled_dot_product(
# MHA models: (batch_size, num_heads, query_length, head_dim)
query_shape = query.shape
batch_size = query_shape[0]
kv_seq_len = key.shape[-2]

if self.multi_query:
query_length = query_shape[1]
Expand Down

0 comments on commit ae73232

Please sign in to comment.