Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17389

Why am I getting this error when loading fine-trained T5 Model?

$
0
0

I'm trying to load a fine-tuned T5 model that I trained myself. I have it in the correct directory, the file is a .pth

I'm basically working with the exact same code, that has always worked so far, but now I'm using another computer and getting an error.

I checked to see whether the versions of torch and transformers were the same as the one that was used when the model was saved. What else could the problem be?

Thanks so much for your help!

This is the error message:

in loadraise pickle.UnpicklingError(UNSAFE_MESSAGE + str(e)) from None_pickle.UnpicklingError: Weights only load failed. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution.Do it only if you get the file from a trusted source. WeightsUnpickler error: Unsupported class transformers.models.t5.modeling_t5.T5ForConditionalGeneration


Viewing all articles
Browse latest Browse all 17389

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>