Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we support loading models stored as safetensors files on HF? #248

Open
Sukh-P opened this issue Aug 27, 2024 · 1 comment
Open

Should we support loading models stored as safetensors files on HF? #248

Sukh-P opened this issue Aug 27, 2024 · 1 comment
Labels
discussion enhancement New feature or request

Comments

@Sukh-P
Copy link
Member

Sukh-P commented Aug 27, 2024

I noticed that with certain versions of hugging face hub, above version 0.19 I think that models loaded to HF get saved as safetensors instead of .bin files by default and we don't currently support loading a safetensor model in our from_pretrained method, I don't know a lot about safetensors apart from skimming through the documentation page but seems it might be quicker to load models with them, be a bit more secure and also gives you a bit more model transparency on HF (shows some metadata without opening the file in the HF UI)

Wanted to open a discussion here on whether it would be worth moving to saving models in this new format and supporting loading them? Or at the very least adding support for loading them so we can have an option of which format we save them in? Keen to hear your thoughts @peterdudfield @dfulu @AUdaltsova, thanks

@Sukh-P Sukh-P added discussion enhancement New feature or request labels Aug 27, 2024
@peterdudfield
Copy link
Contributor

Thats a great idea, would need to update the from_pretrained and the save method? Perhaps worth doing once to see the speed ups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants