Update llama.py

This commit is contained in:
Daniel Han-Chen 2024-02-02 20:20:14 +11:00
commit a5a123db08

View file

@ -683,7 +683,7 @@ pass
@torch.inference_mode
def LlamaModel_fast_forward_inference(
self,
input_ids
input_ids,
past_key_values,
):
# Fix out of bounds tokenization
@ -753,7 +753,7 @@ def LlamaForCausalLM_fast_forward(
if past_key_value is not None and \
hasattr(self.model.layers[0].self_attn, "paged_attention"):
outputs = LlamaModel_fast_forward_inference(
self.model,
input_ids,