Update llama.py
This commit is contained in:
parent
5260ec2a0a
commit
a77c448939
1 changed files with 2 additions and 2 deletions
|
|
@ -160,8 +160,8 @@ def LlamaAttention_fast_forward_inference(
|
|||
# Knn = Knn.reshape(1, n_heads, cached_len, head_dim)
|
||||
# Vnn = Vnn.reshape(1, n_heads, cached_len, head_dim)
|
||||
new_seq_len = seq_len + 1
|
||||
Knn = Kn[:, :, None, :].expand(n_kv_heads, n_groups, new_seq_len, head_dim)
|
||||
Vnn = Vn[:, :, None, :].expand(n_kv_heads, n_groups, new_seq_len, head_dim)
|
||||
Knn = Kn[:, None, :, :].expand(n_kv_heads, n_groups, new_seq_len, head_dim)
|
||||
Vnn = Vn[:, None, :, :].expand(n_kv_heads, n_groups, new_seq_len, head_dim)
|
||||
Knn = Knn.reshape(n_heads, new_seq_len, head_dim)
|
||||
Vnn = Vnn.reshape(n_heads, new_seq_len, head_dim)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue