最終更新:2025-01-24 (金) 09:46:13 (163d)  

huggingface-cli download
Top / huggingface-cli download

help

  • 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-download] [--resume-download]
                                                       [--token TOKEN] [--quiet] [--max-workers MAX_WORKERS]
                                                       repo_id [filenames ...]
    
    positional arguments:
      repo_id               ID of the repo to download from (e.g. `username/repo-name`).
      filenames             Files to download (e.g. `config.json`, `data/metadata.jsonl`).
    
    optional arguments:
      -h, --help            show this help message and exit
      --repo-type {model,dataset,space}
                            Type of repo to download from (defaults to 'model').
      --revision REVISION   An optional Git revision id which can be a branch name, a tag, or a commit hash.
      --include [INCLUDE ...]
                            Glob patterns to match files to download.
      --exclude [EXCLUDE ...]
                            Glob patterns to exclude from files to download.
      --cache-dir CACHE_DIR
                            Path to the directory where to save the downloaded files.
      --local-dir LOCAL_DIR
                            If set, the downloaded file will be placed under this directory. Check out https://huggingface.co/docs/huggingface_hub/guides/download#download-files-to-
                            local-folder for more details.
      --local-dir-use-symlinks {auto,True,False}
                            Deprecated and ignored. Downloading to a local directory does not use symlinks anymore.
      --force-download      If True, the files will be downloaded even if they are already cached.
      --resume-download     Deprecated and ignored. Downloading a file to local dir always attempts to resume previously interrupted downloads (unless hf-transfer is enabled).
      --token TOKEN         A User Access Token generated from https://huggingface.co/settings/tokens
      --quiet               If True, progress bars are disabled and only the path to the download files is printed.
      --max-workers MAX_WORKERS
                            Maximum number of workers to use for downloading files. Default is 8.