error

#107
by sumanthb007 - opened

python model.py
Traceback (most recent call last):
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_errors.py", line 304, in hf_raise_for_status
response.raise_for_status()
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/meta-llama/Meta-Llama-3-8B/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\hub.py", line 398, in cached_file
resolved_file = hf_hub_download(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_validators.py", line 119, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py", line 1403, in hf_hub_download
raise head_call_error
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py", line 1261, in hf_hub_download
metadata = get_hf_file_metadata(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_validators.py", line 119, in _inner_fn
return fn(*args, **kwargs)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py", line 1674, in get_hf_file_metadata
r = _request_wrapper(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py", line 369, in _request_wrapper
response = _request_wrapper(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\file_download.py", line 393, in _request_wrapper
hf_raise_for_status(response)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\huggingface_hub\utils_errors.py", line 321, in hf_raise_for_status
raise GatedRepoError(message, response) from e
huggingface_hub.utils._errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-66330066-698e93b82b9a2d16194c2067;4dd45065-a957-45a4-bb8b-41e1205dba7f)

Cannot access gated repo for url https://huggingface.co/meta-llama/Meta-Llama-3-8B/resolve/main/config.json.
Access to model meta-llama/Meta-Llama-3-8B is restricted. You must be authenticated to access it.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\bsssu\OneDrive\Desktop\t_t\t_t\model.py", line 7, in
model = AutoModelForCausalLM.from_pretrained(model_name)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\auto\auto_factory.py", line 523, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\auto\configuration_auto.py", line 928, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\configuration_utils.py", line 631, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\configuration_utils.py", line 686, in _get_config_dict
resolved_config_file = cached_file(
File "C:\Users\bsssu\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\utils\hub.py", line 416, in cached_file
raise EnvironmentError(
OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/meta-llama/Meta-Llama-3-8B.
401 Client Error. (Request ID: Root=1-66330066-698e93b82b9a2d16194c2067;4dd45065-a957-45a4-bb8b-41e1205dba7f)

Cannot access gated repo for url https://huggingface.co/meta-llama/Meta-Llama-3-8B/resolve/main/config.json.
Access to model meta-llama/Meta-Llama-3-8B is restricted. You must be authenticated to access it.

Seems like you have not raised access to llama3 via HuggingFace .
On the model card their is a form which you need to fill and have the same email id as you have on facebook in order to get it approved .

I received the same error but I was already granted access.

Same issue here

same issue, can anyone help

Same issue. At least, glad that I am not the only one with this problem.

same issue here

Same here. I received an email however it isn't letting me download it?

Meta Llama org

Hey all! Please make sure to log in in your environment using huggingface-cli login. You can use huggingface-cli whoami to verify your user. Make sure you're logged in and in the right user.

Hey all! Please make sure to log in in your environment using huggingface-cli login. You can use huggingface-cli whoami to verify your user. Make sure you're logged in and in the right user.

This solved my issue. Thank you!

sameeeeeee please grant me access

Sign up or log in to comment