Skip to content

Conversation

@deepdiffuser
Copy link
Contributor

this restricts malicious weights from executing arbitrary code by restricting the unpickler to only loading tensors, primitive types, and dictionaries.

see torch.load docs

https://pytorch.org/docs/stable/generated/torch.load.html

i tested this and it seems to work the same as before

this restricts malicious weights from executing arbitrary code by restricting the unpickler to only loading tensors, primitive types, and dictionaries
@ggerganov ggerganov merged commit a931202 into ggml-org:master Mar 12, 2023
@wizzard0
Copy link
Contributor

@deepdiffuser I do support this change, but now I get

TypeError: 'weights_only' is an invalid keyword argument for Unpickler()

Any ideas?

@deepdiffuser
Copy link
Contributor Author

what version of pytorch? I believe you need 1.13.1 for this arg

@wizzard0
Copy link
Contributor

Ah, I see. conda gets you 1.12.1. Let's keep this thread for posterity.

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.

3 participants