Skip to content

philschmid/rust-hf-hub-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-hf-hub-loader

hf-hub-loader is a tiny CLI that pulls repositories from hf.co/models using a binary instead of installing git or git lfs.

Installation

change permission to execute the binary

chmod+x /hf-hub-loader

load your repository

./hf-hub-loader hf://philschmid/infinity-sentiment

Usage

1. Pull a complete repository

./hf-hub-loader hf://philschmid/infinity-sentiment

loads the complete repo in the current dir, like git clone

2. pull/load with filter/subdirectory

./hf-hub-loader hf://philschmid/infinity-sentiment//infinity

loads the only everything from the subdirectory infinity in the current dir

3. pull/load with filter/subdirectory destination directory

./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

4. pull/load specific file from repository

./hf-hub-loader hf://philschmid/infinity-sentiment//infinity/config.json

loads the only specific file config.json in current dir

5. pull/load specific file from repository into destination directory

./hf-hub-loader hf://philschmid/infinity-sentiment//infinity/config.json infinity

loads the only specific file config.json in destination directory infinity

6. Pull a private repository

./hf-hub-loader hf://philschmid/private-repo-test --auth-token api_xx

loads the complete repo in the current dir, like git clone

Getting started locally

  1. run cli locally
cargo run -- hf://philschmid/infinity-sentiment
  1. run tests
cargo test
  1. build release version
cargo build  --release
mv target/release/hf-hub-loader build/hf-hub-loader

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages