From baf8e4c0a8b198214c795cf05ea60a2cbadb2145 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 10 Mar 2024 13:11:42 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index ae52312deb..7ecb00af9e 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -705,8 +705,7 @@ def CausalLM_fast_forward(fast_forward_inference): *args, **kwargs, ) -> Union[Tuple, CausalLMOutputWithPast]: - if False: #past_key_values is not None and \ - hasattr(self.model.layers[0].self_attn, "paged_attention"): + if False: #past_key_values is not None and hasattr(self.model.layers[0].self_attn, "paged_attention"): outputs = fast_forward_inference( self.model, input_ids, @@ -723,7 +722,7 @@ def CausalLM_fast_forward(fast_forward_inference): # decoder outputs consists of (dec_features, layer_state, dec_hidden, dec_attn) self.model._has_no_labels = labels is None - + outputs = self.model( input_ids=input_ids, causal_mask=causal_mask,