1. 在對應模型的huggingface頁面上提交申請
搜索對應的模型型號
登錄huggingface,在模型詳情頁面上,找到這個表單,填寫內容,提交申請。需要使用梯子,country填寫梯子的位置吧(比如美國)
等待一小時左右,會有郵件通知。
- 創建access token
在huggingface上登錄后,點擊頭像,選擇setting,點擊左側的access tokens,新建一個,然后復制。
- 使用huggingface cli下載模型
pip install -U huggingface_hub
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download 模型名稱 --local-dir 存放模型的位置 --local-dir-use-symlinks False --resume-download --token token序列號xxxxxxx
比如
huggingface-cli download --resume-download meta-llama/Llama-2-7b-chat-hf --local-dir /data1/user/model/meta-llama/Llama-2-7b-chat-hf/ --local-dir-use-symlinks False --resume-download --token xxxxx
這樣就可以下載好啦