A thin wrapper that reroutes HuggingFace through a mirror
A convenience wrapper that redirects the official HuggingFace downloader to a mirror site for faster, more reliable model pulls.

What it does
hf_download.py is a thin Python wrapper around huggingface-cli and hf_transfer. It automates downloads of models and datasets from the HuggingFace mirror hf-mirror.com, and it will quietly install the underlying official tools if they are missing. The script adds basic file filtering with --include and --exclude patterns, plus token support for gated models like the Llama family.
The interesting bit
The author openly admits this began as a personal convenience script, which explains its pragmatic—if slightly rough—design. For example, specifying a custom --save_dir still forces a temporary cache in ~/.cache/huggingface/hub before files are moved to their final destination. It is glue code, but it is honest glue code.
Key highlights
- Wraps official
huggingface-cliandhf_transfer; auto-installs them if absent. - Pulls from
hf-mirror.comby default, with a flag to disable mirroring. - Supports
--includeand--excludeglob patterns to cherry-pick files from large repos. - Handles gated models via
--token(e.g., Meta’s Llama weights).
Caveats
- Specifying a custom
--save_dirstill temporarily caches files in~/.cache/huggingface/hub, so that drive needs spare disk space. - The README contains a typo (
--exlucde) and warns thathf_transferversions below 0.1.4 suppress the progress bar. - The author notes this is a simple wrapper built for personal habit; advanced users should modify it or use the official CLI directly.
Verdict
Grab this if you are behind a slow or unstable link to the main HuggingFace hub and want a one-shot script that handles mirroring, token auth, and selective file downloads. Skip it if you already have a working mirror setup or need fine-grained control over cache management.
Frequently asked
- What is LetheSec/HuggingFace-Download-Accelerator?
- A convenience wrapper that redirects the official HuggingFace downloader to a mirror site for faster, more reliable model pulls.
- Is HuggingFace-Download-Accelerator open source?
- Yes — LetheSec/HuggingFace-Download-Accelerator is an open-source project tracked on heatdrop.
- What language is HuggingFace-Download-Accelerator written in?
- LetheSec/HuggingFace-Download-Accelerator is primarily written in Python.
- How popular is HuggingFace-Download-Accelerator?
- LetheSec/HuggingFace-Download-Accelerator has 1.3k stars on GitHub.
- Where can I find HuggingFace-Download-Accelerator?
- LetheSec/HuggingFace-Download-Accelerator is on GitHub at https://github.com/LetheSec/HuggingFace-Download-Accelerator.