From cd60ce16384f865737acf81d53dfa12113a178f1 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 1 Dec 2024 02:36:17 -0800 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index f22cf315a1..1bffb0cb16 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1706,6 +1706,8 @@ class FastLlamaModel: spaces = re.search('\n([\s\t]{1,})', original_debug).group(0)[1:] front_spaces = re.match('([\s\t]{1,})', inner_training_loop).group(0) + # Cannot use \\ since it will cause a SyntaxWarning in Python 3.12 + # Instead use chr(92) == \\ debug_info = """debug_info = \\ f"==((====))== Unsloth - 2x faster free finetuning | Num GPUs = {args.world_size}\\n"\\ f" {chr(92)}{chr(92)} /| Num examples = {num_examples:,} | Num Epochs = {num_train_epochs:,}\\n"\\