Facebook에서 공개한 모델을 이용한 코드를 실행할 때 이런 에러가 발생하곤 한다.
OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/meta-llama/Llama-2-13b-chat-hf.
403 Client Error. (Request ID: Root=1-6721ebf7-7a4a27d70498268b7a541bad;009e9237-0cf4-427c-b98c-22575c34f3d4)
Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-2-13b-chat-hf/resolve/main/config.json.
Your request to access model meta-llama/Llama-2-13b-chat-hf is awaiting a review from the repo authors.
Facebook은 Llama 모델을 공개한 대신에 사용하려면 개인 정보를 제공하는 데 동의를 받고 있다.
해당 URL에 웹브라우저로 접근하여 약관에 동의하고 개인 정보를 제공한 다음, huggingface-cli login을 이용해 로그인 상태를 유지하면 된다. 로그인할 때 access token이 필요한데, huggingface 계정의 설정에서 access token을 발급받을 수 있다.
반면에, Mistral은 개인 정보를 제공할 필요는 없지만 약관에 간단히 동의만 하면 로그인 상태에서 사용할 수 있도록 허용하고 있다.
사용 요청 후에 여기서 승인 여부를 확인할 수 있다.
https://huggingface.co/settings/gated-repos