Skip to content

Commit

Permalink
Use get_chat_template() instead of default_chat_template (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarobartt authored Aug 19, 2024
1 parent 73dce0c commit 28bf902
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 28bf902

Please sign in to comment.