Update tokenizer_utils.py

This commit is contained in:
Daniel Han 2024-11-13 19:05:15 -08:00
commit f554e663ec

View file

@ -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