UKPLab / sentence-transformers

State-of-the-Art Text Embeddings
https://www.sbert.net
Apache License 2.0
15.03k stars 2.45k forks source link

torch>=1.3.0 in requirements ? #523

Open xiaoha798 opened 3 years ago

xiaoha798 commented 3 years ago

Very minor issue here. For some reason, I ran into troubles when using PyTorch 1.2.0. Specifically when using BatchSemiHardTripletLoss, I got an error similar to https://github.com/huggingface/transformers/issues/2126. Using PyTorch >=1.3.0 seems to solve the problem. I suggest changing the requirements accordingly.

nreimers commented 3 years ago

It is highly recommended to use Pytorch 1.6.0. Some of the newer models also only work with Pytorch >= 1.6.0.

Not sure about updating the requirements, in some setups people might be required to use old Pytorch version. However, as mentioned, the framework (and also transformers framework) works best with pytroch >= 1.6.0