From ca99d7c19477193891ba36c71c61fe17d1589579 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Fri, 2 Feb 2024 16:46:30 +1100 Subject: [PATCH] Update mistral.py --- unsloth/models/mistral.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unsloth/models/mistral.py b/unsloth/models/mistral.py index 76f9af11e0..1c6beacd37 100644 --- a/unsloth/models/mistral.py +++ b/unsloth/models/mistral.py @@ -55,6 +55,10 @@ def MistralAttention_fast_forward( position_ids, ) return A, None, past_key_value + elif hasattr(self, "paged_attention"): + del self.paged_attention_K + del self.paged_attention_V + del self.paged_attention pass bsz, q_len, _ = hidden_states.size()