huggingface

huggingface

加速下载

在服务器中下载huggingface model

首先,安装huggingface-cli。

pip install -U huggingface_hub

接着,设置环境变量。

# 写入 ~/.bashrc
export HF_ENDPOINT=https://hf-mirror.com
source .bashrc

最后下载即可。

hf download  {model_name} --local-dir {path/to/your/local_dir}

配置镜像源

export HF_ENDPOINT=https://hf-mirror.com

huggingface
https://mingsm17518.github.io/2026/03/05/常用命令/huggingface/
作者
Ming
发布于
2026年3月5日
更新于
2026年3月5日
许可协议