Update mistral.py
This commit is contained in:
parent
e184b06c4b
commit
f186fe9bc9
1 changed files with 2 additions and 2 deletions
|
|
@ -69,8 +69,7 @@ def MistralAttention_fast_forward(
|
|||
Q = Q.view(bsz, q_len, n_heads, head_dim).transpose(1, 2)
|
||||
K = K.view(bsz, q_len, n_kv_heads, head_dim).transpose(1, 2)
|
||||
V = V.view(bsz, q_len, n_kv_heads, head_dim).transpose(1, 2)
|
||||
print(hidden_states.shape)
|
||||
print(Q.shape, K.shape, V.shape)
|
||||
print(hidden_states.shape, Q.shape, K.shape, V.shape, type(past_key_value))
|
||||
|
||||
kv_seq_len = K.shape[-2]
|
||||
if past_key_value is not None:
|
||||
|
|
@ -98,6 +97,7 @@ def MistralAttention_fast_forward(
|
|||
Q = Q.transpose(1, 2)
|
||||
K = K.transpose(1, 2)
|
||||
V = V.transpose(1, 2)
|
||||
print(Q.shape, K.shape, V.shape)
|
||||
M = bsz * q_len
|
||||
|
||||
has_swa = isinstance(causal_mask, xformers.attn_bias.BlockDiagonalCausalMask)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue