TinyLLaVA / TinyLLaVA_Factory

A Framework of Small-scale Large Multimodal Models
https://arxiv.org/abs/2402.14289
Apache License 2.0
658 stars 68 forks source link

EnvironmentError: Accessing Gated Repo in train_openelm.sh #130

Closed YenCheHsiao closed 1 week ago

YenCheHsiao commented 1 week ago

I encountered an error when trying to run the train_openelm.sh script located in the /scripts/train/openelm/ directory.

Error Message:

raise EnvironmentError(
OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/meta-llama/Llama-2-7b-hf.
401 Client Error. (Request ID: Root=1-67303e7c-1818e87c26db738f0953207d;29973a37-62d7-4984-8699-f02587ba247d)

Cannot access gated repo for url https://huggingface.co/meta-llama/Llama-2-7b-hf/resolve/main/config.json.
Access to model meta-llama/Llama-2-7b-hf is restricted. You must have access to it and be authenticated to access it. Please log in.

Could you provide guidance on how to add the Hugging Face access token for the Llama-2-7b-hf model?

ZhangXJ199 commented 1 week ago

You can obtain your token from "https://huggingface.co/settings/tokens".

YenCheHsiao commented 1 week ago

Sorry, I meant to ask where I should add the token. Should it be included in the submission script, or somewhere within the Python code?

ZhangXJ199 commented 1 week ago

You can use the command "huggingface-cli download --token hf_*** --resume-download meta-llama/Llama-2-7b-hf --local-dir Llama-2-7b-hf" to download the model to a specified location, and then modify the script path accordingly.

YenCheHsiao commented 1 week ago

It works! Thank you for the help.