mirror of
https://github.com/wassname/alignment-handbook.git
synced 2026-07-31 12:10:49 +08:00
Use get_chat_template() instead of default_chat_template (#197)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user