Skip to content

Commit 263d06f

Browse files
Fix extra template loading (#40455)
* Fix extra template loading * Reformat * Trigger tests
1 parent 58cebc8 commit 263d06f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/transformers/tokenization_utils_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,6 +2015,7 @@ def from_pretrained(
20152015
revision=revision,
20162016
cache_dir=cache_dir,
20172017
):
2018+
template = template.removesuffix(".jinja")
20182019
vocab_files[f"chat_template_{template}"] = f"{CHAT_TEMPLATE_DIR}/{template}.jinja"
20192020

20202021
# Get files from url, cache, or disk depending on the case

0 commit comments

Comments
 (0)