Update chat_templates.py

This commit is contained in:
Daniel Han-Chen 2024-03-07 02:48:15 +11:00
commit 03232dff4e

View file

@ -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,):