From f554e663ec16cf86fab5ba9df0c5934b37b75e2d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 13 Nov 2024 19:05:15 -0800 Subject: [PATCH] Update tokenizer_utils.py --- unsloth/tokenizer_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py index ed95e07632..302017d566 100644 --- a/unsloth/tokenizer_utils.py +++ b/unsloth/tokenizer_utils.py @@ -586,10 +586,10 @@ pass def _fix_chat_template(chat_template): - endfor = "{% endfor %}" + endfor = "{% endif %}" where = chat_template.find(endfor) if where == -1: - endfor = "{%- endfor %}" + endfor = "{%- endif %}" where = chat_template.find(endfor) if where == -1: return chat_template