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

Weights only #1430

Merged
merged 9 commits into from
Oct 28, 2024
Merged

Weights only #1430

merged 9 commits into from
Oct 28, 2024

Conversation

AngledLuffa
Copy link
Collaborator

Upgrade all models to use weights_only=True when loading

stops an annoying future proofing warning (well, that & the security hole)

#1429

…re in the save files, use weights_only=True. Significantly cuts down on the number of torch warnings. #1429
…: need to load in existing ones with numpy, but need to save new ones as torch. Users who have their own pretrain should check out this commit (or install 1.10), then load & resave the embedding to convert it to the new format

Update various models to no longer try to turn pretrains from numpy to torch, since those will already be torch

For now, make it possible to read pretrain models with weights_only=False.  This will be changed in a future version of Stanza
…ot necessary for the pretrain. this is good, as that protocol may not be supported by weights_only=True
…n make the load & save code convert all its pieces to types that work with weights_only=True. Will allow the CNNClassifier objects used for sentiment to function with weights_only=True.

Also convert the constituency classifier to use torch.load(weights_only=True), although there are no distributed constituency classifiers yet
…y=True, keeping backwards compatibility with older models for now
@AngledLuffa AngledLuffa merged commit 46b281a into dev Oct 28, 2024
1 check passed
@AngledLuffa AngledLuffa deleted the weights_only branch October 28, 2024 17:40
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.

1 participant