Update mistral.py
This commit is contained in:
parent
54dd81de67
commit
72d9e5f5a0
1 changed files with 3 additions and 0 deletions
|
|
@ -78,6 +78,9 @@ def MistralAttention_fast_forward(
|
|||
if past_key_value is not None:
|
||||
kv_seq_len += past_key_value[0].shape[-2]
|
||||
|
||||
# Extend RoPE dynamically to fit in VRAM
|
||||
self.rotary_emb.extend_rope_embedding(V, seq_len = kv_seq_len)
|
||||
|
||||
if position_ids is None:
|
||||
cos = self.rotary_emb.cos_cached
|
||||
sin = self.rotary_emb.sin_cached
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue