Describe the bug
hf download of large xet-backed models can exit with status 0 even when downloads did not actually complete. The cache blobs/ directory contains *.incomplete files at exit time, but the CLI reports success and subsequent from_pretrained() calls fail with cryptic errors because the snapshot points at incomplete blobs.
Distinct from #3960 (process killed mid-download): in our case the process exits normally with status 0 but the data is incomplete. The exit code lies; only filesystem state is the ground truth.
Reproduction
NVIDIA DGX Spark (GB10 Blackwell SM12.1, ARM v9.2-A aarch64), Debian 13, default xet enabled.
# Large model with multiple xet-backed shards (3.5 GB each)
hf download mistralai/Voxtral-4B-TTS-2603 --revision main
echo "exit: $?" # → 0 (claims success)
find ~/.cache/huggingface/hub -name '*.incomplete' | wc -l
# → 3 (silent failure)
Symptoms surface during retry runs on flaky upstream connectivity. Xet endpoints return HTTP 416 "Requested Range Not Satisfiable" on partial-blob CAS lookups, which hf_transfer 0.1.9 treats as fatal but the CLI exit code does not reflect this.
Expected behavior
If any blob remains .incomplete at end of run, exit should be non-zero. Filesystem state is the source of truth.
Workarounds (each independently effective on this hardware)
- `HF_HUB_DISABLE_XET=1` — falls back to non-xet path. Slower but stable.
- `HF_HUB_DOWNLOAD_TIMEOUT=300` — extends httpx timeout for >3 GB shards (separate `httpx.ReadTimeout` failure mode without it).
- Filesystem-level `find blobs -name '*.incomplete' | wc -l == 0` check as exit-code substitute.
Full write-up with the debugging path and a 347-LOC wrapper (`hf-pull`) that combines all three with exponential-backoff retries and progress diagnostics: https://sovgrid.org/blog/fixes-hf-download-lies-at-22gb/
System info
```
- huggingface_hub version: 1.8.0
- Platform: Linux 6.17.0-1014-nvidia aarch64
- Hardware: NVIDIA DGX Spark (GB10, SM12.1, 128 GB unified memory, CUDA 13)
- Python version: 3.12.3
- httpx: 0.28.1
- hf_transfer: 0.1.9
- HF_HUB_DOWNLOAD_TIMEOUT: not set (default)
- HF_HUB_DISABLE_XET: not set (xet enabled)
```
Additional context
Reproducible across three different large model downloads (Voxtral-4B-TTS-2603, VibeVoice-Large, Qwen3.6-35B-A3B-PrismaQuant). All exit-zero with incomplete blobs without workarounds applied.
Describe the bug
hf downloadof large xet-backed models can exit with status 0 even when downloads did not actually complete. The cacheblobs/directory contains*.incompletefiles at exit time, but the CLI reports success and subsequentfrom_pretrained()calls fail with cryptic errors because the snapshot points at incomplete blobs.Distinct from #3960 (process killed mid-download): in our case the process exits normally with status 0 but the data is incomplete. The exit code lies; only filesystem state is the ground truth.
Reproduction
NVIDIA DGX Spark (GB10 Blackwell SM12.1, ARM v9.2-A aarch64), Debian 13, default xet enabled.
Symptoms surface during retry runs on flaky upstream connectivity. Xet endpoints return HTTP 416 "Requested Range Not Satisfiable" on partial-blob CAS lookups, which
hf_transfer0.1.9 treats as fatal but the CLI exit code does not reflect this.Expected behavior
If any blob remains
.incompleteat end of run, exit should be non-zero. Filesystem state is the source of truth.Workarounds (each independently effective on this hardware)
Full write-up with the debugging path and a 347-LOC wrapper (`hf-pull`) that combines all three with exponential-backoff retries and progress diagnostics: https://sovgrid.org/blog/fixes-hf-download-lies-at-22gb/
System info
```
```
Additional context
Reproducible across three different large model downloads (Voxtral-4B-TTS-2603, VibeVoice-Large, Qwen3.6-35B-A3B-PrismaQuant). All exit-zero with incomplete blobs without workarounds applied.