diff --git a/src/transformers/tokenization_utils_base.py b/src/transformers/tokenization_utils_base.py index 8f91ca6fcddf..5a0d2e0567c8 100644 --- a/src/transformers/tokenization_utils_base.py +++ b/src/transformers/tokenization_utils_base.py @@ -2015,6 +2015,7 @@ def from_pretrained( revision=revision, cache_dir=cache_dir, ): + template = template.removesuffix(".jinja") vocab_files[f"chat_template_{template}"] = f"{CHAT_TEMPLATE_DIR}/{template}.jinja" # Get files from url, cache, or disk depending on the case