usage: huggingface-cli <command> [<args>] download [-h] [--repo-type {model,dataset,space}] [--revision REVISION] [--include [INCLUDE ...]] [--exclude [EXCLUDE ...]] [--cache-dir CACHE_DIR] [--local-dir LOCAL_DIR] [--local-dir-use-symlinks {auto,True,False}] [--force-do...
2、配置镜像 export HF_ENDPOINT=hf-mirror.com 3、下载模型到缓存 huggingface-cli download repo_id 4、下载模型到指定目录 huggingface-cli download repo_id --local-dir /path/to/model 5、扫描缓存 huggingface-cli scan-cache 6、清理缓存 huggingface-cli delete-cache ...
主要是一个简单记录,方便后续使用 安装 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/h...
使用命令行下载 下载全部文件添加--resume-download参数,此时将保存至/root/.cache/.../文件夹中 huggingface-cli download --resume-download meta-llama/Llama-2-13b-chat-hf 下载全部文件并保存到指定位置时,添加--local-dir参数,此时将保存至./Llama-2-13b-chat-hf/中 huggingface-cli download --resume-do...
huggingface-cli download --repo-type dataset --token 你的token --resume-download 数据集名称 --cache-dir /本地路径 --local-dir /本地路径 --local-dir-use-symlinks False 替换你的token 为你的 Hugging Face 访问令牌。 替换数据集名称 为你想要下载的数据集的名称。 /本地路径 是你希望缓存和存储...
huggingface-cli download --repo-type dataset --resume-download wikitext --local-dir wikitext 1. 3. 命令解释和其他情况 3.1 下载全部文件,需要添加--resume-download参数,此时将保存至/root/.cache/.../文件夹中 3.2 当需要下载指定文件夹中,需要添加--local-dir参数,此时将保存至wikitext文件夹中 ...
>>> huggingface-cli download gpt2 config.json /home/wauplin/.cache/huggingface/hub/models--gpt2/snapshots/11c5a3d5811f50298f278a704980280950aedb10/config.json >>> huggingface-cli download gpt2 config.json --local-dir=./models/gpt2 ./models/gpt2/config.json ...
If file is tracked as regular: download the remote file into the cache using hf_hub_download. Compute the sha of the local file and the cached file. If different, we want to upload it. Downloading regular files shouldn't be a problem in most cases (only "small" files and not a lot...
使用 下载模型 huggingface-clidownload--resume-downloadgpt2--local-dirgpt2 下载数据 huggingface-clidownload--repo-typedataset--resume-downloadwikitext--local-dirwikitext 默认cache 位置 $HOME/.cache/huggingface/hub 加速 =https://hf-mirror.com
# Download a single file >>> huggingface-cli download gpt2 config.json /home/wauplin/.cache/huggingface/hub/models--gpt2/snapshots/11c5a3d5811f50298f278a704980280950aedb10/config.json # Download files to a local directory >>> huggingface-cli download gpt2 config.json --local-dir=./models...