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

[feat] Integrate safetensors with Dense, etc. modules too. #2722

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

tomaarsen
Copy link
Collaborator

Hello!

Pull Request overview

  • Integrate safetensors with Dense, etc. modules too.

Details

This adds the safe_serialization: bool = True option to all remaining modules that previously saved and loaded exclusively with "pytorch_model.bin". A notable edge case is the LSTM model, which has to be saved on cpu due to some internal magic that torch does when moving a LSTM model to CUDA.

cc @philschmid @beurkinger This should allow re-adding model.safetensors for the Dense layer in LaBSE once you've moved your dependencies up to the (yet unreleased) 3.0.1. Semi-related: I suspect that moving from 2.* to 3.* will not result in notable issues.

  • Tom Aarsen

@tomaarsen tomaarsen merged commit 6ea9903 into UKPLab:master Jun 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant