It’s only me, but models are several GB’s and on unstable connection hf tool is just useless and it’s better to use curl, because it can continue, while this thing drops after one disconnect?
Not across runs. If a file fails mid-download, current huggingface_hub deletes its partial temp file, so your next run starts that file from zero. Files you already finished are kept, though, and many big models are split into shards, so a rerun only redoes the broken shard. Within one run, hf_xet (now the default path) retries failed requests itself, five times by default. I think raising that limit and looping the command helps on your flaky line:
export HF_XET_CLIENT_RETRY_MAX_ATTEMPTS=20
until hf download <repo_id>; do sleep 5; done
For one huge single file, curl -C - is still the safer bet.
Yea, but I kinda think it shades bad light on python as whole… pip is same, and you can’t resume on broken connection… On slow internet it can loose 10’s minutes of progress.
How does it comes, that python a thing so simple to code in that everybody chooses to code in it falls behind some old C code like a curl?
Losing ten minutes of progress on a slow connection is a fair complaint. I’d report it as a downloader recovery issue, with the hf, huggingface_hub and hf_xet versions: does it preserve partial data after a failed run, and does the next attempt actually resume? Python can support that behavior too; changing languages alone wouldn’t fix a policy that discards the partial download.