Toolkit for managing huggingface models and datasets
Project description
huggingface_tool
Tools for loading, upload, managing huggingface models and datasets
Installation
pip install huggingface-tool
Usage
Firstly, you need to login with huggingface-cli login
(you can create or find your token at settings).
- Download and save transformer models with:
htool save-model <model_class> <model_name> <save_dir>
- For example:
htool save-model AutoModelForCausalLM gpt2 ./gpt2
- For example:
- Download and save tokenizer with:
htool save-tk <tokenizer_name> <save_dir>
- For example:
htool save-tk gpt2 ./gpt2
- For example:
- Download and save dataset with:
htool save-data <dataset_name> <save_dir>
- For example:
htool save-data daily_dialog ./daily_dialog
- For example:
- Download and save diffusion models with:
htool save-dm <model_name> <save_dir>
- For example:
htool save-dm google/ddpm-cat-256 ./google/
- For example:
You can also use htool to upload datasets and models to huggingface.
- Upload dataset with:
htool upload-data <local_dataset_dir> <organization_or_username/dataset_name>
- For example:
htool upload-data ./daily_dialog OpenRL/daily_dialog
- For example:
- Upload model with:
htool upload-model <local_model_dir> <organization_or_username/model_name>
- For example:
htool upload-model ./tizero OpenRL/tizero
- For example:
Citing huggingface_tool
If our work has been helpful to you, please feel free to cite us:
@misc{huggingface_tool2023,
title={huggingface_tool},
author={OpenRL Contributors},
publisher = {GitHub},
howpublished = {\url{https://github.com/OpenRL-Lab/huggingface_tool}},
year={2023},
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
huggingface_tool-0.0.4.tar.gz
(12.3 kB
view hashes)
Built Distribution
Close
Hashes for huggingface_tool-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d3ed0ccdfda80e8365ca567bc6ae1d3d4a4a7c62b3ee7b9d300b33b700787e |
|
MD5 | 117e493bee7afc77cbe96ae0317d5fa2 |
|
BLAKE2b-256 | 2cdf437526ca430318ad249e283f5ce1fe9dd3407238bffb5c8b02218f77b3da |