From 9a09d161f23c2b39dff8c75f24013d60e0f4cc2d Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Tue, 2 Jan 2024 03:37:04 +1100 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index b021ac2b3b..7d0acab52e 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -756,6 +756,9 @@ class FastLlamaModel: # Clear deleted GPU items gc.collect() torch.cuda.empty_cache() + + # We check the tokenizer first for errors + check_tokenizer(model, tokenizer) return model pass @@ -791,9 +794,6 @@ class FastLlamaModel: assert(module in accepted_modules) pass - # We check the tokenizer first for errors - check_tokenizer(model, tokenizer) - # Get LoRA lora_config = LoraConfig( r = r,