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
'torch._C.PyTorchFileReader' object has no attribute'seek' #994
Comments
Which PyTorch version are you using? Have you tried to update it to some recent version (>= 1.6.0)? |
I am using 1.6.0 |
Do other models work? |
I will try this one: https://huggingface.co/sentence-transformers/paraphrase-xlm-r-multilingual-v1/tree/main I am renaming downloaded model zip file as pytorch_model.bin |
Hi, And unzip it by yourself. No renaming of files. |
What do you download? As mentioned, you must use the zip files from here: It should have a 0_Transformer, 1_Pooling and several json files includes. Also, you can just load it with: |
Previously, I downloaded from huggingface. Now, I downloaded from sbert.net I still get the same error:
I tried it now on my local machine also and it is working fine. |
Ah ok, that is the problem. The torch load function requires that the file system supports seek (e.g. see https://www.tutorialspoint.com/python/file_seek.htm) Apparently, your company cloud file system does not support this elementary file system operation. Hence, torch.load cannot load any file. Real solution would be to get a better company cloud with a file system that support basic I/O operations. In PyTorch 1.6, they changed the file format when models are saved. Maybe on your company cloud the old file format works? You can try it with this model: It has still the pre PyTorch 1.6. file format. |
It seems to be working. Can this model be used for multilingual similarity calculation? Is there any alternative? Thank you. |
Sadly not. But you can convert from the new torch format to the old format like this:
Run this on your local machine and then you can push it to your cloud |
I get this error when saving the model.
|
This is working. Thank you. |
Hello,
I am using the following model for sentence similarity
https://huggingface.co/sentence-transformers/stsb-xlm-r-multilingual/tree/main
But, I get this error:
I checked on web but could not find any solution. What could be the problem? Thank you.
The text was updated successfully, but these errors were encountered: