一、大模型相关
hf-mirror
参考文档:https://hf-mirror.com/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| #1. 安装依赖 pip install -U huggingface_hub
#2. 设置环境变量 # Linux 建议将这一行写入 ~/.bashrc export HF_ENDPOINT=https://hf-mirror.com # Windows Powershell $env:HF_ENDPOINT = "https://hf-mirror.com"
#3.1 下载模型 huggingface-cli download --resume-download gpt2 --local-dir gpt2
#3.2 下载数据集 huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext # 可以添加 --local-dir-use-symlinks False 参数禁用文件软链接,这样下载路径下所见即所得
|