[go: up one dir, main page]

Skip to content

Download Huggingface repositories without the need to install dependencies

License

Notifications You must be signed in to change notification settings

AspadaX/RustyFace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustyFace

A command line app for downloading Huggingface repositories with Rust.

RustyFace Logo

Crates.io License: MIT

Why using this?

RustyFace does not require installing additional dependencies such as git or git lfs etc. It aims to be lightweight and portable. In addition to that, RustyFace is friendly to users who live in Mainland China, where HuggingFace accessibility is unstable, as this CLI app adopted a mirror that can be accessed globally.

The mirror site used in this project is hf-mirror.com

How to Install and Use RustyFace

First, you need to have Rust installed. For those new to Rust, please refer to the official installation guide.

Quickstart - Without Installation

You don't need to install Rust if you download the corresponding binaries to your platform from the Release section. That way, you can just type this command to download Huggingface repositories:

rustyface_windows_x86 --repository sentence-transformers/all-MiniLM-L6-v2 --tasks 4
  • rustyface_windows_x86 is the binary file name that you have downloaded from the Release section.
  • --repository is followed by the repo_id of the repository that you want to download from HuggingFace.
  • --tasks is followed by the number of concurrent downloads. For example, 4 means downloading 4 files at once. It is recommended to use a lower number if your network conditions do not support higher concurrency.

Quickstart - With Installtion

If you would like to reuse the program, it is recommended to install RustyFace onto your system rather than using the binaries. Here is how you can do it.

Install Rust

On Linux and macOS:

curl https://sh.rustup.rs -sSf | sh

On Windows, you can download the installation executable via this link: https://win.rustup.rs/

Install RustyFace

After done installing Rust, just type this to your terminal:

cargo install rustyface

Use RustyFace to Download Repositories

Try RustyFace out with this simple command line:

rustyface --repository sentence-transformers/all-MiniLM-L6-v2 --tasks 4
  • --repository is followed by the repo_id of the repository that you want to download from HuggingFace.
  • --tasks is followed by the number of concurrent downloads. For example, 4 means downloading 4 files at once. It is recommended to use a lower number if your network conditions do not support higher concurrency.

Feedback & Further Development

Any participation is appreciated! Feel free to submit an issue, discussion or pull request. You can find me on WeChat: baoxinyu2007 or Discord: https://discord.gg/UYfZeuPy

License

This project is licensed under the MIT License. See the LICENSE file for details.

Packages Used

  • clap for command line argument parsing.
  • futures-util for asynchronous operations.
  • indicatif for progress bars.
  • log for logging.
  • reqwest for HTTP requests.
  • sha2 for SHA-256 hashing.
  • tokio for asynchronous runtime.
  • fern for logging configuration.
  • chrono for date and time handling.