I using hugging face unity api in my project. It work good until today. When its start doing request its gives error 404 on 3 modules. Like this: Attempted request to https://api-inference.huggingface.co/models/facebook/wav2vec2-base-960h failed: HTTP/1.1 404 Not Found - Not Found. I update token, check versions of models and everything is fine. Read forums, saw the same problem the day before. No one is answering. Git for Hugging Face Unity API: GitHub - huggingface/unity-api
Currently, the API is not functioning properly. Roughly speaking, there are at least three types of issues occurring simultaneously.
Same here!
The retry error and SentenceTransformers issue of them have been resolved.
I still see 404 for private models that are accessible with HF tokens.
I am just downloading a private model using AutoTokenizer.from_pretrained(model_name, token=hf_token).
And I see this error (redacted model name):
Some layers that were to be ignored were not found in the model: {βlm_headβ}
Loading checkpoint shards: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 15/15 [00:01<00:00, 8.80it/s]
Traceback (most recent call last):
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/huggingface_hub/utils/_http.pyβ, line 409, in hf_raise_for_status
response.raise_for_status()
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/requests/models.pyβ, line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/ABC/ABC/tree/main/additional_chat_templates?recursive=False&expand=False
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File β/Users/pdavoodi/dev/kashkul/download_model.pyβ, line 43, in
main()
^^^^^^
File β/Users/pdavoodi/dev/kashkul/download_model.pyβ, line 40, in main
download_model(args.model_name, args.hf_token, args.output_dir)
File β/Users/pdavoodi/dev/kashkul/download_model.pyβ, line 24, in download_model
tokenizer = AutoTokenizer.from_pretrained(model_name, token=hf_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/transformers/models/auto/tokenization_auto.pyβ, line 1013, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/transformers/tokenization_utils_base.pyβ, line 1968, in from_pretrained
for template in list_repo_templates(
^^^^^^^^^^^^^^^^^^^^
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/transformers/utils/hub.pyβ, line 163, in list_repo_templates
for entry in list_repo_tree(
^^^^^^^^^^^^^^^
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/huggingface_hub/hf_api.pyβ, line 3140, in list_repo_tree
for path_info in paginate(path=tree_url, headers=headers, params={βrecursiveβ: recursive, βexpandβ: expand}):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/huggingface_hub/utils/_pagination.pyβ, line 37, in paginate
hf_raise_for_status(r)
File β/Users/pdavoodi/dev/kashkul/.venv/lib/python3.12/site-packages/huggingface_hub/utils/_http.pyβ, line 459, in hf_raise_for_status
raise _format(RepositoryNotFoundError, message, response) from e
huggingface_hub.errors.RepositoryNotFoundError: 404 Client Error. (Request ID: Root=1-68373be4-46ee93762ab34ba046e48128;bf96df50-0ef0-43fe-aa61-d99773bf9c60)
Repository Not Found for url: https://huggingface.co/api/models/ABC/ABC/tree/main/additional_chat_templates?recursive=False&expand=False.
Please make sure you specified the correct repo_id
and repo_type
.
If you are trying to access a private or gated repo, make sure you are authenticated. For more details, see Quickstart
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/ABC/ABC/tree/main/additional_chat_templates?recursive=False&expand=False
I think the program is not passing tokens when searching for template files, causing an error in requests. However, there is no such part in the AutoTokenizer code itself, so I think it is in the code of the specific Tokenizer class that is actually called.
If I know which modelβs Tokenizer is being used, that would be a clueβ¦