-
Notifications
You must be signed in to change notification settings - Fork 515
Installation
You can install the package by either using PyPI
pip install simcse
Or directly install it from our code
git clone https://github.com/princeton-nlp/SimCSE.git
cd SimCSE
python setup.py install
Most dependencies are automatically solved when installing the package. However, there are two special dependencies, PyTorch and Faiss.
If you are using GPUs, you should check the PyTorch official website for instructions for installing correct versions, otherwise there is chance that PyTorch cannot work correctly with your GPU devices.
For fast indexing and retrieval, our package supports the use of Faiss, a library for efficient similarity search and clustering of dense vectors. Note that faiss
is not a necessary dependency for our package, but if you install one, simcse
automatically takes faiss
as the backend.
We recommend using PyPI for installing faiss
. If you want to use the CPU-version faiss
, run
pip install faiss-cpu
For GPU-version faiss
, run
pip install faiss-gpu
WARNING: We have found that faiss <= 1.7.0
did not well support Nvidia AMPERE GPUs (3090 and A100). In that case, you should change to other GPUs or install the CPU version of faiss
package.