Update llama.py
This commit is contained in:
parent
8aeb3c0e1c
commit
961a672158
1 changed files with 3 additions and 2 deletions
|
|
@ -1018,8 +1018,9 @@ def CausalLM_fast_forward(fast_forward_inference):
|
|||
*args, **kwargs,
|
||||
) -> Union[Tuple, CausalLMOutputWithPast]:
|
||||
# Check for uninitialized DynamicCache
|
||||
print(past_key_values, len(past_key_values))
|
||||
if past_key_values is not None and len(past_key_values) != 0:
|
||||
if past_key_values is not None and len(past_key_values) == 0:
|
||||
past_key_values = None
|
||||
if past_key_values is not None:
|
||||
outputs = fast_forward_inference(
|
||||
self,
|
||||
input_ids,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue