Update llama.py
This commit is contained in:
parent
1289ae825b
commit
9a5062e6c4
1 changed files with 4 additions and 2 deletions
|
|
@ -144,8 +144,10 @@ def LlamaAttention_fast_forward_inference(
|
|||
Kn *= cos; Kn.addcmul_(RH_K, sin);
|
||||
|
||||
# New KV cache
|
||||
Kn = torch.cat([K1, Kn], dim = 2)
|
||||
Vn = torch.cat([V1, Vn], dim = 2)
|
||||
# Kn = torch.cat([K1, Kn], dim = 2)
|
||||
# Vn = torch.cat([V1, Vn], dim = 2)
|
||||
Kn = torch.cat([K1, Kn], dim = 1)
|
||||
Vn = torch.cat([V1, Vn], dim = 1)
|
||||
|
||||
# Grouped query attention
|
||||
if n_groups != 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue