q_len == 1
This commit is contained in:
parent
5d9e68181e
commit
d6e85d7731
2 changed files with 1 additions and 2 deletions
|
|
@ -232,7 +232,6 @@ def LlamaAttention_fast_forward(
|
|||
) -> Tuple[torch.Tensor, Optional[torch.Tensor], Optional[Tuple[torch.Tensor]]]:
|
||||
|
||||
bsz, q_len, _ = hidden_states.size()
|
||||
print(hidden_states.size())
|
||||
|
||||
# Check for inference
|
||||
if past_key_value is not None and q_len == 1 and bsz == 1:
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ def MistralAttention_fast_forward(
|
|||
bsz, q_len, _ = hidden_states.size()
|
||||
|
||||
# Check for inference
|
||||
if past_key_value is not None and q_len == 1:
|
||||
if past_key_value is not None and q_len == 1 and bsz == 1:
|
||||
A, past_key_value = LlamaAttention_fast_forward_inference(
|
||||
self,
|
||||
hidden_states,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue