GatedRepoError
, HTTPError
등이 발생함.# 내 경우: meta-llama/Llama-3.1-8B 다운 시 아래와 같은 오류 발생
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
File /opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_http.py:406, in hf_raise_for_status(response, endpoint_name)
405 try:
--> 406 response.raise_for_status()
407 except HTTPError as e:
File /opt/conda/lib/python3.10/site-packages/requests/models.py:1024, in Response.raise_for_status(self)
1023 if http_error_msg:
-> 1024 raise HTTPError(http_error_msg, response=self)
HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/meta-llama/Llama-3.1-8B/resolve/main/config.json
The above exception was the direct cause of the following exception:
GatedRepoError Traceback (most recent call last)
File /opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:403, 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)
401 try:
402 # Load from URL or cache if already cached
--> 403 resolved_file = hf_hub_download(
404 path_or_repo_id,
405 filename,
406 subfolder=None if len(subfolder) == 0 else subfolder,
407 repo_type=repo_type,
408 revision=revision,
...
HuggingFace에서 write token 생성
Hugging Face > Settings > Access Tokens > Create new token > Write
!! 생성한 token은 다시 볼 수 없으니 복사하여 메모장 등에 저장하기 !!
Hugging Face 모델 페이지에서 LICENSE AGREEMENT 작성
승인까지 대기하기
위 LICENSE AGREEMENT를 작성하면 아래와 같이 나오는데,
your settings를 눌러보면 Request Status가 보인다.
처음에는PENDING
이라고 나올텐데, 5분 정도 기다리면 승인된다.
huggingface-cli login