faise的安装使用
1. Faiss简介
Faiss是Facebook开源的一款用于大规模P维向量最近邻检索的工具。
Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning. Faiss is written in C++ with complete wrappers for Python/numpy. Some of the most useful algorithms are implemented on the GPU. It is developed by Facebook AI Research.
他底层采用C ++编写,并且提供了python的封装代码。主要功能是,对于一个给定的向量,在所有已知的向量库中找出与其相似度较高的向量,即该向量的前k个最近邻向量。
尤其是随着万物皆可Embedding时代的到来,Faiss越来越受到人们关注。
2. Faiss安装
可以pip安装
pip install faiss-cpu --no-cache
也可以采用conda安装