Crystalcareai
commited on
Commit
•
331e42c
1
Parent(s):
6551767
Update modeling_quiet.py
Browse files- modeling_quiet.py +1 -0
modeling_quiet.py
CHANGED
@@ -669,6 +669,7 @@ class QuietSdpaAttention(QuietAttention):
|
|
669 |
if past_key_value is not None:
|
670 |
cache_kwargs = {"sin": sin, "cos": cos} # Specific to RoPE models
|
671 |
key_states, value_states = past_key_value.update(key_states, value_states, self.layer_idx, cache_kwargs)
|
|
|
672 |
|
673 |
key_states = repeat_kv(key_states, self.num_key_value_groups)
|
674 |
value_states = repeat_kv(value_states, self.num_key_value_groups)
|
|
|
669 |
if past_key_value is not None:
|
670 |
cache_kwargs = {"sin": sin, "cos": cos} # Specific to RoPE models
|
671 |
key_states, value_states = past_key_value.update(key_states, value_states, self.layer_idx, cache_kwargs)
|
672 |
+
kv_seq_len = key_states.shape[-2]
|
673 |
|
674 |
key_states = repeat_kv(key_states, self.num_key_value_groups)
|
675 |
value_states = repeat_kv(value_states, self.num_key_value_groups)
|