如何快速下載huggingface模型/數據—全方法總結 |
文章目錄
- 一. 如何快速下載huggingface大模型
- 1.1. IDM(Windows)下載安裝連接
- 1.2. 推薦 huggingface 鏡像站
- 1.3. 管理huggingface_hub cache-system(緩存系統)
- 二. 參考文獻
一. 如何快速下載huggingface大模型
- 推薦 huggingface 鏡像站:https://hf-mirror.com/
- 推薦官方的 huggingface-cli 命令行工具、以及個人開發的 hfd 腳本。
- 詳細可以參考原作者個人網站:https://padeoe.com/huggingface-large-models-downloader/
- 詳細可以參考原作者知乎連接:https://zhuanlan.zhihu.com/p/663712983

1.1. IDM(Windows)下載安裝連接
- Internet Download Manager,全球最佳下載利器。Internet Download Manager (簡稱IDM) 是一款Windows 平臺功能強大的多線程下載工具,國外非常受歡迎。支持斷點續傳,支持嗅探視頻音頻,接管所有瀏覽器,具有站點抓取、批量下載隊列、計劃任務下載,自動識別文件名、靜默下載、網盤下載支持等功能。
- Internet Download Manager IDM 中文便攜版 v6.42.2:https://www.ahhhhfs.com/11659/
1.2. 推薦 huggingface 鏡像站
pip install -U huggingface_hub
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download --local-dir-use-symlinks False bigscience/bloom-560m --local-dir bloom-560m
huggingface-cli download --token hf_*** --resume-download --local-dir-use-symlinks False meta-llama/Llama-2-7b-hf --local-dir Llama-2-7b-hf
HF_ENDPOINT=https://hf-mirror.com python your_script.py

- https://huggingface.co/docs/huggingface_hub/guides/download#download-files-to-local-folder

1.3. 管理huggingface_hub cache-system(緩存系統)
- https://huggingface.co/docs/huggingface_hub/guides/manage-cache

二. 參考文獻
- 詳細可以參考原作者個人網站:https://padeoe.com/huggingface-large-models-downloader/
- 詳細可以參考原作者知乎連接:https://zhuanlan.zhihu.com/p/663712983