下载多个文件并排除一些文件可使用--include和--exclude命令 huggingface-cli download meta-llama/Llama-2-13b-chat-hf --include ".safetensors" --exclude ".bin" 需要huggingface token 时 (Gated Repo),添加--token参数 huggingface-cli dow
下载多个文件并排除一些文件可使用--include和--exclude命令 huggingface-cli download meta-llama/Llama-2-13b-chat-hf --include "*.safetensors" --exclude "*.bin" 需要huggingface token 时 (Gated Repo),添加--token参数 huggingface-cli download meta-llama/Llama-2-13b-chat-hf --include "*.safetens...
usage: huggingface-cli [<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-download] [...
--include (可选)指定要下载的文件包含模式(支持多个模式)。 --exclude (可选)指定要排除下载的文件模式(支持多个模式)。 --hf_username (可选)Hugging Face用户名用于认证(非邮箱)。 --hf_token (可选)Hugging Face令牌用于认证。 --tool (可选)使用的下载工具:aria2c(默认)或wget。 -x (可选)aria2...
huggingface-cli download 指定数据目录 --include "*.safetensors" --exclude "*.bin" 1. 表示下载指定数据目录,以safetensors结尾的,不下载.bin结尾的文件。 为什么会要这么做,tmd下载一半电脑挂了,头大。 3.6 当下载时候需要token,则添加参数--token,命令如下: huggingface-cli download 指定数据目录 --inclu...
--include: e.g.,--include "*.json" "*.safetensors" --exclude: e.g.,--exclude "*.bin" Download a single file $ huggingface-cli download {repo ID} {file name} --local-dir {local path} Releases No releases published
include="data/python/*" --exclu de="*.json" --exclude="*.zip" Fetching 206 files: 100%|████████████████████████████████████████████| 206/206 [02:31<2:31, ?it/s] /home/wauplin/.cache/huggingface/hub/datasets--bigcode--the...
其在DownloadCommand 类中,定义了 --include, --exclude的参数解析器,参数nargs="*", type=str,意为解析后续任意数量的参数,并作为一个string类型的列表返回。 将这两个参数赋值allow_patterns = self.include; ignore_patterns = self.exclude,后传入/src/huggingface_hub/_snapshot_download.py 的snapshot_down...
$ huggingface-cli download {repo ID} --local-dir {local path} --include: e.g., --include "*.json" "*.safetensors" --exclude: e.g., --exclude "*.bin"Download a single file$ huggingface-cli download {repo ID} {file name} --local-dir {local path} ...
--include=... --exclude=... --delete-missing --merge --max-workers=... Process (TL;DR)Here is a TL;DR of what would be done under-the-hood when calling this push(...) method. I made a more detailed version below.Create repo/list remote files. List local files to push. ...