Open thehayat opened 3 years ago
me too, i want to know how to solve it
What are your versions of pytorch, transformers and sentence-transformers?
It might be due to an old, outdated pytorch version.
Edit: See: https://github.com/huggingface/transformers/issues/5593
It appears to be an issue in transformers with an outdated pytorch version. Easiest solution is to update pytorch.
For me.
torch = 1.1.0
sentence-transformers=0.3.0
transformers=3.0.2
I believe versions are fine as per the document of this library.
Also error is coming from transformers
do you still suggest updating pytorch?
Hi @thehayat torch 1.1.0 is quite outdated. Transformers tested the example with torch 1.3.1+.
I recommend to update to update to a more recent / the most recent version of torch.
Hi @thehayat torch 1.1.0 is quite outdated. Transformers tested the example with torch 1.3.1+.
I recommend to update to update to a more recent / the most recent version of torch.
Hello, Will you be able to provide the link to download torch 1.3.1+
whl
file directly to local. I couldn't find one.
Hi @thehayat Just follow the installation guidelines on the pytorch website: https://pytorch.org/get-started/locally/
I can recommend to use the most recent version of pytorch.
I was able to solve it using 1.6.0 stable version.
pip install torch == 1.6.0
I was trying with the newest version (1.6.0) of PyTorch but still got the error AttributeError: 'Tensor' object has no attribute 'ndim'
I was trying the following example but I get the following error with
transformers version =3.0.2