HuggingFace 的镜像网站
有了这个网站,我们可以快速地下载 HuggingFace 上的公开的大模型
使用方法有两种
方法一
使用 huggingface 官方提供的 huggingface-cli 命令行工具。
1. 安装相关依赖
pip install -U huggingface_hub
2. 基本命令示例
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download --resume-download --local-dir-use-symlinks False facebook/musicgen-small --local-dir musicgen-small
方法二
通过设置环境变量来解决
export HF_ENDPOINT=https://hf-mirror.com
python your_script.py