hf的国内平替hf-mirror
hf-mirror的hf的国内平替
https://hf-mirror.com/
1. 安装依赖
pip install -U huggingface_hub
2. 设置环境变量
Linux
export HF_ENDPOINT=https://hf-mirror.com
Windows Powershell
$env:HF_ENDPOINT = "https://hf-mirror.com"
建议将上面这一行写入 ~/.bashrc。
3 下载模型
huggingface-cli download --resume-download gpt2 --local-dir gpt2
4 下载数据集
huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext
reference
---
hf-mirror
https://hf-mirror.com/