mirror of
https://github.com/huggingface/transformers.git
synced 2025-10-20 17:13:56 +08:00
Fix extra template loading (#40455)
* Fix extra template loading * Reformat * Trigger tests
This commit is contained in:
@ -2015,6 +2015,7 @@ class PreTrainedTokenizerBase(SpecialTokensMixin, PushToHubMixin):
|
||||
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
|
||||
|
Reference in New Issue
Block a user