admin管理员组

文章数量:1558087

如何利用国内的镜像下载Hugging Face模型与数据集?

首先需要安装git-lfs,专门针对大文件的一个包。

sudo apt update
sudo apt install git-lfs

然后安装huggingface_hub

pip install -U huggingface_hub

修改镜像源

export HF_ENDPOINT="https://hf-mirror"

下载模型

huggingface-cli download --resume-download bigscience/bloom-560m --local-dir bloom-560m

如果需要token:

huggingface-cli download --token hf_*** --resume-download bigscience/bloom-560m --local-dir bloom-560m
export HF_ENDPOINT="https://hf-mirror"
huggingface-cli download --resume-download timbrooks/instruct-pix2pix --local-dir timbrooks/instruct-pix2pix

本文标签: 镜像模型国内数据Hugging