Questions tagged [faiss]
77 questions
0
votes
1 answer
How to save/load faiss KMeans for later inference
I have successfully clustered a bunch of vectors using the faiss kmeans. But now I am not able to store the model and load it later for inference.
clustering = faiss.Kmeans(candles.shape[1], k=clusters, niter=epochs, gpu=gpu,…

KIC
- 5,887
- 7
- 58
- 98
0
votes
0 answers
Return the max cosine similarity and target text from list which is most similar using FIASS
How can I use FAISS ( Facebook AI Similarity Search ) to compare cosine similarity with texts with list of target texts, and return the max cosine similarity and target text from list which is most similar:
I have done this sofar:
import faiss
…

Python-data
- 45
- 6
0
votes
0 answers
on searching in milvus return single ID for list of vectors
I'm using milvus 2.1.2
I have data in this format:
{
ID : 001
Vec : { [0.01, 0.05, ...],
[0.03, 0.08, ...],
.
.
.
[0.06, 0.09, ...] }
ID : 002
Vec…
0
votes
0 answers
Error in faiss::Index* faiss::read_index(faiss::IOReader*, int) : Index type 0x73726576 ("vers") not recognized
Error:
Terminate called after throwing an instance of 'faiss::FaissException'
what(): Error in faiss::Index* faiss::read_index(faiss::IOReader*, int) at ../faiss/faiss/impl/index_read.cpp:793: Index type 0x73726576 ("vers") not recognized
Platform:…

Tung Vu
- 1
0
votes
0 answers
Methods for searching for people with similar purchasing habits in big data with a given person as the base
I'm looking at finding people with similar purchasing behaviors with a given person or group as a starting point for a market research problem.
I'm going to use vectors and represent every person and their habits as a vector and then compare these…

RFAI
- 459
- 4
- 17
0
votes
0 answers
How can i update faiss trained index incrementally?
I am using Faiss to index some sentences, and the sentences will add by user erverday, so i need to update index file everyday, i just load the trained index using faiss.read_index(file) and use indexer.add to add the embeddings incrementally,…

kenj
- 1
0
votes
1 answer
faiss.normalize_L2(embeddings) gives the distances in a range of 212.0 when index.Search() is executed
index = faiss.IndexFlatL2(vectormatrix.shape[1])
print(index.is_trained)
faiss.normalize_L2(vectormatrix)
index.add(vectormatrix)
print(index.ntotal)
Distance, Index = index.Search(token_vector.reshape((1,token_vector.size)), k)

AKHILA NAZ
- 1
- 1
0
votes
0 answers
Multiprocess python function which calculate Faiss index
Hey I have pyspark df like this:
id emb pt
1 [5,0.8..] 'h'
2 [0.7, 0.8..] 'd'
3 [1, 3, ..] 'h'
4 [0.3, 0.8..] 'f'
Now I have to compute Faiss index on emb column within pt
So first I'm collecting all unique pt:
pt…

Chris_007
- 829
- 11
- 29
0
votes
1 answer
FAISS: how to get euclidean distance between the vectors
I have a set of the vectors for index training
train = [[0.8037452 0.29432032 0.7007814 0.87885666 0.7204465 0.90595365
0.553066 0.91305405 0.7757398 0.60006464]
[0.68810666 0.6761919 0.0508003 0.9548363 0.3328804 0.5403833
0.28921887…

NineWasps
- 2,081
- 8
- 28
- 45
0
votes
1 answer
Faiss - Determine cluster size after kmeans clustering
I have a set of around 180K sentence embeddings. I have indexed them using faiss IndexIVFFlat index and clustered them using faiss k-means clustering functionality. I have 20 clusters.
Now I would like to determine the size of the clusters - i.e.…

Varvara Litvinova
- 71
- 6
0
votes
1 answer
Docker Multi-stage Builds of miniconda environments and Python
i want to use multi stage build in docker.
the first stage is to install faiss library, and the second stage is to install the main images.
here is my script
FROM conda/miniconda3 as install_faiss
WORKDIR /app
RUN conda install -c conda-forge…

newbie programmer
- 11
- 2
0
votes
1 answer
Does anyone know the benchmark of Milvus 2.0 GA standalone?
When running Milvus 2.0 ga standalone using docker compose, what is the level of performance that can be expected for a collection of 100M 256-dimensional vectors (with an IVF_SQ8 index, nlist = 65536), in terms of # queries/second? The current…

coolflower
- 69
- 8
0
votes
2 answers
Compile hello.cpp. flags - C++ FAISS GPU
I would like to use FAISS C++ GPU externally in another repo. Therefore, I created a hello.cpp and tried to compile it without going into the faiss directory. Inside the faiss directory, compilation seems fine to me.
hello.cpp (C++ Faiss…

Hossam Amer
- 17
- 9
0
votes
2 answers
What is the effective way to store and retrieve the image feature?
I am a beginner in computer vision, my goal is to extract K-nearest neighbours for an image, I had a look at Annoy, Faiss, NMSLIB algorithms and decided to use Faiss for image similarity. I have a large dataset to check for the nearest neighbours. I…

Gopinath
- 56
- 5
0
votes
0 answers
Import error for Facebook library 'faiss'. It's throwing DLL load failed error
Import error for Facebook library 'faiss'. It's throwing DLL load failed error
import faiss
Error is :
ImportError: DLL load failed: The specified module could not be found.
Can anyone help me with this? I've installed with pip install faiss-cpu…

Nithin Reddy
- 580
- 2
- 8
- 18