Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run llama example : access to source requires login credentials #350

Closed
dbrowne opened this issue Aug 8, 2023 · 4 comments
Closed

Comments

@dbrowne
Copy link

dbrowne commented Aug 8, 2023

cargo run --example llama --release
warning: some crates are on edition 2021 which defaults to resolver = "2", but virtual workspaces default to resolver = "1"
note: to keep the current resolver, specify workspace.resolver = "1" in the workspace root's manifest
note: to use the edition 2021 resolver, specify workspace.resolver = "2" in the workspace root's manifest
Finished release [optimized] target(s) in 0.17s
Running target/release/examples/llama
Running on CPU, to run on GPU, build this example with --features cuda
loading the model weights from meta-llama/Llama-2-7b-hf
Error: request error: https://huggingface.co/meta-llama/Llama-2-7b-hf/resolve/main/tokenizer.json: status code 401

Caused by:
https://huggingface.co/meta-llama/Llama-2-7b-hf/resolve/main/tokenizer.json: status code 401

@LaurentMazare
Copy link
Collaborator

This is likely caused by the model being "gated": you have to accept some conditions before being able to access it, and you should be able to do so by registering on the huggingface hub, then accessing https://huggingface.co/meta-llama/Llama-2-7b-hf (and then you'll have to set up some authentication token so that permissioning will be checked).

@Narsil
Copy link
Collaborator

Narsil commented Aug 9, 2023

pip install huggingface_hub
huggingface-cli login

For those who have already access to the Python ecosystem. Otherwise create a file in $HOME/.cache/huggingface/token containing your HF token.

@LaurentMazare
Copy link
Collaborator

Closing this as hopefully it's all good with the instructions above.

@liangzid
Copy link

Might be better to write it onto readme files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants