§16.12

Fix stuck or incomplete Hugging Face downloads

Resume a stuck hf download, clear broken .incomplete partials with hf cache prune, and speed transfers with hf_xet when disk space allows.

by published 21 Oct 2026 checked against docs 21 Oct 2026 3 min in Hugging Face Markdown

On this page5 sections
  1. 1. Re-run the same command
  2. 2. Clear broken partials
  3. 3. Speed it up with hf_xet
  4. 4. Check disk and cache location
  5. Verify it worked

A hf download that stalled or died does not need to start over. Re-run the exact same command: finished files are skipped from the cache and the interrupted file continues from its .incomplete partial. If a partial is corrupt, prune it and pull again.

1. Re-run the same command

hf download bartowski/Meta-Llama-3.1-8B-Instruct-GGUF Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf

Completed files come straight from the cache and the stalled transfer picks up where it stopped, so nothing is fetched twice.

2. Clear broken partials

hf cache ls

Shows cached repos and flags leftover incomplete downloads with a hint.

hf cache prune

Deletes unreferenced revisions and every leftover .incomplete partial, which clears a corrupt half-file so the next download is clean (hf cache rm never touches partials).

3. Speed it up with hf_xet

pip install -U huggingface_hub

Installs hf_xet alongside the library, which enables chunked, resumable transfers automatically — no flag needed.

The older hf_transfer package and its HF_HUB_ENABLE_HF_TRANSFER=1 switch are now deprecated; use hf_xet instead.

4. Check disk and cache location

export HF_HOME=/mnt/big/hf

Moves the whole cache to another drive; the default is ~/.cache/huggingface/hub, which fills the home partition fast. See where the Hugging Face cache lives to confirm the path first.

Verify it worked

hf cache verify bartowski/Meta-Llama-3.1-8B-Instruct-GGUF

Checks the cached files against the Hub checksums and reports any mismatch. If it fails:

  • Download keeps timing out — raise the timeout from its default of 10 seconds and re-run: export HF_HUB_DOWNLOAD_TIMEOUT=30.
  • 401 or “gated repo” — accept the licence and log in first; see access gated models.
  • No space left on device — run hf cache prune, or point HF_HOME at a larger disk.

Next: the full hf download workflow. Cache internals: Hugging Face’s cache guide.

← All Hugging Face plates · Search all guides

↑↓ move↵ openalt+↵ copy first command

Keyboard

⌘/ctrl+K or /
Search all guides
alt+↵
In search: copy the guide's first command
j / k
Move through a list of guides
c
On a guide: copy its first command
t
Toggle light / dark
?
This list