From 03232dff4e6fe5a9bc1219573f68ba19c084f89a Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Thu, 7 Mar 2024 02:48:15 +1100 Subject: [PATCH] Update chat_templates.py --- unsloth/chat_templates.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unsloth/chat_templates.py b/unsloth/chat_templates.py index 5ad34d6882..9675b10fe4 100644 --- a/unsloth/chat_templates.py +++ b/unsloth/chat_templates.py @@ -257,6 +257,10 @@ def get_chat_template( assert("Unsloth: Can only map new tokens to EOS for now. Adding new tokens is not yet supported.") pass + if tokenizer.__class__.__name__.startswith("Gemma") and chat_template == "chatml": + chat_template = "gemma_chatml" + pass + old_padding_side = tokenizer.padding_side if type(chat_template) in (list, tuple,):