Hugging Face CLI还提供了一个内置命令来清理缓存,你可以通过运行以下命令来清理所有缓存: bash huggingface-cli delete-cache 这个命令会询问你确认是否要删除缓存,你可以选择要删除的缓存项,并确认删除操作。 通过以上步骤,你可以有效地清理Hugging Face CLI的缓存,以释放磁盘空间并提高系统性能。
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 ...
export HF_HUB_ENABLE_HF_TRANSFER= 1 export HF_ENDPOINT= https://hf-mirror.com usage: huggingface-cli [] huggingface-cli: error: argument {env,login,whoami,logout,repo,lfs-enable-largefiles,lfs-multipart-upload,scan-cache,delete-cache}: i...
your proposition triggered a conversation on our side (cfinternal thread- sorry for the internal link). At the moment, the CLI is quite tiny with commands to login/logout/whoami, scan/delete the cache, create a repo
$ huggingface-cli delete-cache SYNOPSIS huggingface-cli[options] PARAMETERS --help Show help message and exit. --version Show program's version number and exit. --verbose Enable verbose logging. --quiet Disable all outputs. --no-color
EDIT (before reading below): motivation is the same but the plan has been slightly improved (see this comment). Basically, the plan is: add delete_patterns in upload_folder implement commit_in_chunks to chained commits in a PR implement ...
entire directory huggingface-cli upload my-cool-model ./models # Sync local Space with Hub (upload new files except from logs/, delete removed files) huggingface-cli upload Wauplin/space-example --repo-type=space --exclude="/logs/*" --delete="*" --commit-message="Sync local Space with...