yk/patch-torch-save

PoC still working?

Opened this issue · 0 comments

Hi Yannic,

Does this PoC still work? If so, please could you post your requirements.txt or a docker file?

I've tried to run

from transformers import AutoModel model = AutoModel.from_pretrained("ykilcher/totally-harmless-model")

But are met with many errors, including:

UnpicklingError: This error is typically raised when there's an attempt to load a corrupted file or a file that has been tampered with in a way that could potentially execute arbitrary code. It is especially concerning that the error message mentions the eval class, which could indicate a security risk.

UnicodeDecodeError: This error suggests that the file being loaded does not conform to the expected format, possibly because it's not a valid model file or is corrupted.

OSError: This error further suggests problems with the integrity of the checkpoint file. It's also worth noting that there's a mention of potentially trying to load a TensorFlow checkpoint as a PyTorch model, which would be incompatible without setting from_tf=True.