From d40a12852e179acacf05b7bd96e024c045afcde8 Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Wed, 14 Feb 2024 17:31:33 +1100 Subject: [PATCH] Update chat_templates.py --- unsloth/chat_templates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unsloth/chat_templates.py b/unsloth/chat_templates.py index 9db830bc81..0bf3931c50 100644 --- a/unsloth/chat_templates.py +++ b/unsloth/chat_templates.py @@ -372,5 +372,6 @@ def test_chat_templates(): correct_tokenizer = AutoTokenizer.from_pretrained("lmsys/vicuna-7b-v1.5") correct_tokenizer.chat_template = template our_prompt = correct_tokenizer.apply_chat_template(messages[1:], tokenize = False, add_generation_prompt = True) - assert(correct_prompt == our_prompt) + # We add ourselves + assert(correct_prompt == our_prompt.replace("", "")) pass