Skip to content

Commit

Permalink
Use get_chat_template() instead of default_chat_template (hugging…
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt authored and dmilcevski committed Oct 14, 2024
1 parent a2f5897 commit 675b27f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/alignment/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 675b27f

Please sign in to comment.