From c4f1b9270414df5b4da385b3face195e0d10dd5e Mon Sep 17 00:00:00 2001 From: hiyouga Date: Thu, 29 Feb 2024 00:37:29 +0800 Subject: [PATCH] fix #2629 Former-commit-id: c18822669568327d4fbf480a80c5fe5b8fc95e7a --- src/llmtuner/data/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/data/template.py b/src/llmtuner/data/template.py index 428188ba..4f13f416 100644 --- a/src/llmtuner/data/template.py +++ b/src/llmtuner/data/template.py @@ -258,7 +258,7 @@ def get_template_and_fix_tokenizer( template = templates["vanilla"] # placeholder else: template = templates.get(name, None) - if templates is None: + if template is None: raise ValueError("Template {} does not exist.".format(name)) stop_words = template.stop_words