恢复默认源: 如果你之后想恢复使用Hugging Face的默认源,可以重新设置HF_ENDPOINT环境变量: bash export HF_ENDPOINT='https://huggingface.co' # Linux set HF_ENDPOINT=https://huggingface.co # Windows 通过以上步骤,你就可以成功地为huggingface-cli更换下载源了。
如果要避免这个情况,请将上面这一行写入Linux中的 ~/.bashrc。Windows环境没测试过。 2.3 下载指定的模型 huggingface-cli download --resume-download gpt2 --local-dir gpt2 1. 2.4 下载指定的数据集 huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext 1. 3....
huggingface-cli下载数据(含国内镜像源方法) huggingface-cli 是 Hugging Face 官方提供的命令行工具,自带完善的下载功能。 安装依赖 pip install -U huggingface_hub 设置环境变量 linux 建议将上面这一行写入 ~/.bashrc。若没有写入,则每次下载时都需要先输入该命令 export HF_ENDPOINT=https://hf-mirror.com 下...
huggingface-cli 是 Hugging Face 官方提供的命令行工具,自带完善的下载功能。 安装依赖 pip install -U huggingface_hub 设置环境变量 linux # 建议将上面这一行写入 ~/.bashrc。若没有写入,则每次下载时都需要先输入该命令 export HF_ENDPOINT=https://hf-mirror.com Windows Powershell $env:HF_ENDPOINT = "...
Linux: export HF_ENDPOINT="https://hf-mirror.com" Windows: $env:HF_ENDPOINT = "https://hf-mirror.com" 3 使用huggingface cli下载模型 以facebook的sapiens为例,链接:https://huggingface.co/facebook/sapiens/tree/main 可以使用以下命令下载模型 ...
huggingface-cli linux command man page: Manage and interact with Hugging Face Hub
Environment info transformers version: 3.0.2 Platform: Linux-4.15.0-112-generic-x86_64-with-glibc2.10 Python version: 3.8.5 PyTorch version (GPU?): 1.6.0 (False) Tensorflow version (GPU?): 2.3.0 (False) Using GPU in script?: No Using dis...