Additional_chat_templates does not exist on "main"

I use latest version of transformers 4.57.1: Successfully installed tokenizers-0.22.1 transformers-4.57.1. I’m using Kaggle for my project

When I try fine tune any model I get message like this:

Entry Not Found for url: https://huggingface.co/api/models/meta-llama/Llama-3.2-3B-Instruct/tree/main/additional_chat_templates?recursive=false&expand=false.
additional_chat_templates does not exist on "main"

Error message is triggerey by `tokenizer = AutoTokenizer.from_pretrained(model_name)`

I found the same issue here but it says to update to latest version.

1 Like

To bypass errors when URLs are not found, you maybe need the latest version of Hugging Face Hub in addition to the latest Transformers. Kaggle might be using an older version of Hugging Face Hub.
pip install -U "transformers>=4.57.1" "huggingface_hub>=1.01"

I got the same problem. Have you found the solution?

1 Like

Upgrading the library version or pinning to an older, bug-free version can resolve the issue. However, if upgrading the library is difficult in your environment, one of following methods may also work.

# Option 1 (env var)
export HF_HUB_OFFLINE=1

# Option 2 (code) – only uses cached files
tok = AutoTokenizer.from_pretrained(repo, local_files_only=True)
# docs: https://huggingface.co/docs/transformers/main/en/installation#offline-mode