Skip to main content

A CLI tool to download Hugging Face models and datasets from mirror sites.

Project description

hf-mirror-hub

logo

PyPI - Version PyPI - Downloads GitHub License

一个从 Hugging Face 镜像站点快速下载模型和数据集的命令行工具。

特性

  • 使用 Hugging Face 镜像站点加速下载
  • 支持 hf-transfer 加速下载
  • 支持指定保存目录
  • 支持使用 Hugging Face Hub 访问令牌
  • 自动转换软链接为实际文件

安装

从 PyPI 安装 (推荐)

pip install hf-mirror-hub

从源码安装

git clone https://github.com/neverbiasu/hf-mirror-hub.git
cd hf-mirror-hub
conda create -n hf-mirror-hub python=3.8 # 非必需,也可以用 venv 或者直接安装
conda activate hf-mirror-hub
pip install -e .

使用说明

基本用法 (下载模型)

hf-mirror-hub --model <model_name>

完整参数

hf-mirror-hub --model <model_name> --save_dir <save_path> --token <your_token> [--no-hf-transfer]

参数说明

  • --model, -M: 可选,模型名称 (例如: deepseek-ai/DeepSeek-R1-Distill-Qwen-32B)
  • --save_dir, -S: 可选,保存目录路径 (默认为 data)
  • --token, -T: 可选,Hugging Face 访问令牌 (用于访问私有模型或数据集)
  • --no-hf-transfer: 可选,禁用 hf-transfer 加速

贡献

请参阅 CONTRIBUTING.md 了解如何贡献。

许可证

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hf_mirror_hub-0.0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hf_mirror_hub-0.0.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file hf_mirror_hub-0.0.4.tar.gz.

File metadata

  • Download URL: hf_mirror_hub-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.1 Linux/6.11.0-1014-azure

File hashes

Hashes for hf_mirror_hub-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8785e42830e52ec1075618a21860868957f038e1d2f315ef9747b901f2b51bed
MD5 1ff5e60fc6995599e1047bca1d09eea3
BLAKE2b-256 5a9189b8df5c094f9a8bc65daf1d0d9797b0bfae6e29eb40a3bd68432dc2b5c0

See more details on using hashes here.

File details

Details for the file hf_mirror_hub-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: hf_mirror_hub-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.1 Linux/6.11.0-1014-azure

File hashes

Hashes for hf_mirror_hub-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d0d89272b2c7a23ae260299f383a255bddf40d58587bddb6c596cfe544b0b95e
MD5 c0d94d410b632eb130f3d3a1351d7d40
BLAKE2b-256 3b3281ad2facfd5cf30d4615752c427ba928046a8c0ec22de9329595ec2106b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page