Skip to content

Instantly share code, notes, and snippets.

@tanpinsiang
Created November 2, 2023 09:57
Show Gist options
  • Save tanpinsiang/9360301471f210124f5d96a247103f5d to your computer and use it in GitHub Desktop.
Save tanpinsiang/9360301471f210124f5d96a247103f5d to your computer and use it in GitHub Desktop.
How to download model from huggingface

How to download model from huggingface

install The HuggingFace Model Downloader

the script will download the correct version based on os/arch and save the binary as "hfdownloader" in the same folder

bash <(curl -sSL https://g.bodaay.io/hfd) -h

download vicuna-7b-v1.5

./hfdownloader -m lmsys/vicuna-7b-v1.5

check the downloaded files

ls -l Storage

How to download Llama2

apply for access here https://huggingface.co/meta-llama/Llama-2-70b-chat-hf

after you got access get your token in huggingface

download vicuna-7b-v1.5

./hfdownloader -m meta-llama/Llama-2-70b-chat-hf -t HUGGING_FACE_HUB_TOKEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment