Update granite.py
This commit is contained in:
parent
6b735edbcb
commit
f3b5469213
1 changed files with 1 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ def GraniteAttention_fast_forward_inference(
|
|||
# Prefill phase
|
||||
# if not hasattr(self, "paged_attention"):
|
||||
if do_prefill:
|
||||
self.paged_attention = torch.empty((KV_CACHE_INCREMENT+seq_len+1, 2, bsz, n_kv_heads, head_dim), dtype = dtype, device = device))
|
||||
self.paged_attention = torch.empty((KV_CACHE_INCREMENT+seq_len+1, 2, bsz, n_kv_heads, head_dim), dtype = dtype, device = device)
|
||||
self.paged_attention_K = self.paged_attention[:,0]
|
||||
self.paged_attention_V = self.paged_attention[:,1]
|
||||
self.paged_attention_K[:seq_len] = K1.permute(2, 0, 1, 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue