From 28bf9024773af751acdefad6bc6c5815445fc6ba Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:12:39 +0200 Subject: [PATCH] Use `get_chat_template()` instead of `default_chat_template` (#197) --- src/alignment/model_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alignment/model_utils.py b/src/alignment/model_utils.py index 122da3cd..1115b672 100644 --- a/src/alignment/model_utils.py +++ b/src/alignment/model_utils.py @@ -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