Use get_chat_template() instead of default_chat_template (#197)

This commit is contained in:
Alvaro Bartolome
2024-08-19 10:12:39 +02:00
committed by GitHub
parent 73dce0c35d
commit 28bf902477
+1 -1
View File
@@ -88,7 +88,7 @@ def get_tokenizer(
if data_args.chat_template is not None:
tokenizer.chat_template = data_args.chat_template
elif auto_set_chat_template and tokenizer.chat_template is None and tokenizer.default_chat_template is None:
elif auto_set_chat_template and tokenizer.get_chat_template() is None:
tokenizer.chat_template = DEFAULT_CHAT_TEMPLATE
return tokenizer