enable hf-transfer even with num-shard==1

This commit is contained in:
OlivierDehaene 2023-02-18 13:29:33 +01:00
parent 3bf5c2dd65
commit c510c30a17

View File

@ -471,6 +471,9 @@ fn shard_manager(
// Safetensors load fast
env.push(("SAFETENSORS_FAST_GPU".into(), "1".into()));
// Enable hf transfer for insane download speeds
env.push(("HF_HUB_ENABLE_HF_TRANSFER".into(), "1".into()));
// If huggingface_hub_cache is some, pass it to the shard
// Useful when running inside a docker container
if let Some(huggingface_hub_cache) = huggingface_hub_cache {