guidance | How to speed up IndexIVFPQ search in faiss-cpu #3546
Unanswered
gloriamacia
asked this question in
Q&A
Replies: 2 comments
-
What is the dimensionality of the data and what is the index description string? |
Beta Was this translation helpful? Give feedback.
0 replies
-
As a starting point, you could refer to https://github.com/facebookresearch/faiss/wiki/Indexing-1G-vectors for appropriate index types. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using Python faiss-cpu as my organisation does not provide GPUs. My faiss index is made up from 30 M records. My search consists on 0.5 M records. It takes ~30 minutes with 4vCPUs and 16GiB. I would consider up to 10 minutes acceptable. I could increase both the RAM and the CPUs, which one would speed up the most my search time? I welcome recommendations on which values to request for.
My current index.nprobe is set to 1 (default). Hopefully with this improvement I would be able to set it to a higher value e.g. 5. Right now if I set the nprobe to 5 it takes almost 2 hours two run (1h42 mins)!!
I did not find any recommendation on how to choose the optimal value of nprobe in the docs but I am open to suggestions. In general this is a challenge I face for all the parameters, I miss the library providing some guidance or good defaults, and, instead, I just used the ones from this tutorial https://www.pinecone.io/learn/faiss-tutorial/
Beta Was this translation helpful? Give feedback.
All reactions