HTTPError Traceback (most recent call last)…
- User
HTTPError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name) 303 try: --> 304 response.raise_for_status() 305 except HTTPError as e:
16 frames HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/xml-roberta-base/resolve/main/tokenizer_config.json
The above exception was the direct cause of the following exception:
RepositoryNotFoundError Traceback (most recent call last) RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-66f28487-3d938bc65d68b5b020360555;5446d3cd-1731-4e84-a631-24dfda8e835d)
Repository Not Found for url: https://huggingface.co/xml-roberta-base/resolve/main/tokenizer_config.json. Please make sure you specified the correct
repo_idandrepo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.The above exception was the direct cause of the following exception:
OSError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/transformers/utils/hub.py in cached_file(path_or_repo_id, filename, cache_dir, force_download, resume_download, proxies, token, revision, local_files_only, subfolder, repo_type, user_agent, _raise_exceptions_for_gated_repo, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash, **deprecated_kwargs) 423 ) from e 424 except RepositoryNotFoundError as e: --> 425 raise EnvironmentError( 426 f"{path_or_repo_id} is not a local folder and is not a valid model identifier " 427 "listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a token "
OSError: xml-roberta-base is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models' If this is a private repository, make sure to pass a token having permission to this repo either by logging in with
huggingface-cli loginor by passingtoken=<your_token> - Assistant
It seems you're encountering an error because the model identifier you're trying to use,
'xml-roberta-base', does not exist on Hugging Face's model hub. The correct model name is'xlm-roberta-base', not'xml-roberta-base'. It's a common mistake due to the similarity in the names.Here's how you can fix the issue:
Replace
'xml-roberta-base'with'xlm-roberta-base'in your code where you're loading the model or tokenizer.