主要是一个简单记录,方便后续使用 安装 登录后复制 pip install -U huggingface_hub 1. 使用 下载模型 登录后复制 huggingface-cli download --resume-download gpt2 --local-dir gpt2 1. 下载数据 登录后复制 huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext 1. 默认cache 位置 登录后复制 $HOME/.cache/huggingface/hub 1. 加速 登录后复制 export HF_ENDPOINT=https://hf-mirror.com 1. 参考资料 https://hf-mirror.com/ 原创作者: rongfengliang 转载于: https://blog.51cto.com/rongfengliang/11850730