hf_transfer icon indicating copy to clipboard operation
hf_transfer copied to clipboard

Any way to limit upload speeds?

Open bartowski1182 opened this issue 1 year ago • 3 comments

hf_transfer is SO efficient that it actually completely clogs my bandwidth and makes me unable to maintain SSH connections.. Is there any way we can add a cap on up/download speeds? I know probably a niche request..

bartowski1182 avatar Jun 10 '24 23:06 bartowski1182

Try playing around w/ the max_files parameter. max_files controls the # of concurrent downloads, so reducing that should reduce bandwidth. Lmk if that works for you and feel free to close the issue if so :)

McPatate avatar Jun 11 '24 09:06 McPatate

thank you i'll give that a shot! Is it possible to pass this parameter when using huggingface-cli with the HF_HUB_ENABLE_HF_TRANSFER=1 environment variable?

bartowski1182 avatar Jun 11 '24 14:06 bartowski1182

There is a constant in huggingface_hub called HF_TRANSFER_CONCURRENCY. I think the only way would be to monkey patch it before calling the upload/download function.

McPatate avatar Jun 11 '24 15:06 McPatate