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.3.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.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hf_mirror_hub-0.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.20 Darwin/22.6.0

File hashes

Hashes for hf_mirror_hub-0.0.3.tar.gz
Algorithm Hash digest
SHA256 caefa0230d4770ee9df6e72bf064be690df8e224f5448d08a516ef7053ae6aa9
MD5 4af73186a704213889aaf9390c298687
BLAKE2b-256 769f33fa6171f85f39c278dc99b783ea37987937f4aaea62c37cb053ad1733b4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hf_mirror_hub-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.20 Darwin/22.6.0

File hashes

Hashes for hf_mirror_hub-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ce3630b349877d25e955bd67930b78bcaeba95463d60adb9addcf4f33dbfc4a0
MD5 779a1430542da234cc823ef68d78fe4d
BLAKE2b-256 0174234ff5e6cc29129b2b474a2939d6b580463429d39fcf37f04d234a119b3d

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