Static Resumable Downloader for Hugging Face Models

ziozzang0 · reddit · 2026-07-16

The author shared **hftools**: a Hugging Face model downloader built as a **single static Go binary**, focusing on resumable downloads, checksums, and offline scenarios. It addresses several pain points: - Large model downloads failing midway and having to restart from scratch - Lengthy downloads breaking easily during occasional Hub 5xx errors - The need to verify file integrity after transferring multi-GB models to offline machines Key features include: - Default resumable downloads via byte offset - `--retries -1` for infinite retries during prolonged Hub outages - File verification via Git blob SHA-1 / LFS SHA-256, with the ability to generate standard `.sha256` / `.sha1sum` - Conversion between "flat directory" and Hugging Face cache structures - `peek` command to read safetensors / GGUF headers using a single Range request - `scan` command to check for dangerous pickle imports before loading The author notes these features stem from personal frustrations and invites feedback and comparisons with other offline verification solutions.

Original post →

More from Infra

Infra channel →