hf-hub-loader
is a tiny CLI that pulls repositories from hf.co/models using a binary instead of installing git or git lfs.
- Linux 64-bit: https://github.com/philschmid/rust-hf-hub-loader/releases/download/v0.3/hf-hub-loader
- Mac 64-bit: https://github.com/philschmid/rust-hf-hub-loader/releases/download/v0.1/hf-hub-loader
change permission to execute the binary
chmod+x /hf-hub-loader
load your repository
./hf-hub-loader hf://philschmid/infinity-sentiment
./hf-hub-loader hf://philschmid/infinity-sentiment
loads the complete repo in the current dir, like git clone
./hf-hub-loader hf://philschmid/infinity-sentiment//infinity
loads the only everything from the subdirectory infinity
in the current dir
./hf-hub-loader hf://philschmid/infinity-sentiment//infinity test
loads the only everything from the subdirectory infinity
in the dest dir test
-> creates if not exists
./hf-hub-loader hf://philschmid/infinity-sentiment//infinity/config.json
loads the only specific file config.json
in current dir
./hf-hub-loader hf://philschmid/infinity-sentiment//infinity/config.json infinity
loads the only specific file config.json
in destination directory infinity
./hf-hub-loader hf://philschmid/private-repo-test --auth-token api_xx
loads the complete repo in the current dir, like git clone
- run cli locally
cargo run -- hf://philschmid/infinity-sentiment
- run tests
cargo test
- build release version
cargo build --release
mv target/release/hf-hub-loader build/hf-hub-loader