Accelerating Faiss retrieval using FastScan in Faiss
#27 geöffnet am 10. Apr. 2023
Repository-Metriken
- Stars
- (18.427 Stars)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
Thank you for the amazing software. I am particularly interested in the interesting applications of vector search. I am still in the process of setting up, but I plan to try running it soon.
While reading the source code, I noticed a point of concern in the faiss part and created an issue.
Currently, IVF512 is used in retrieval. While I think this is simple and effective as a baseline on the GPU, I believe there are better index factory options when running on the CPU. https://github.com/liujing04/Retrieval-based-Voice-Conversion-WebUI/blob/6c7c1d933ffe2217edc74afadff7eec0078d6d16/infer/train-index.py#L19
This can be done using the FastScan method, by simply changing the index factory from "IVF512,Flat" to "IVF512PQ128x4fsr,Rflat" (512 is the original IVF's parameter, PQ128 indicates half of 256 dimention).
Since I haven't been able to run RVC yet, I'm not sure if this parameter is effective, but in most cases, it works effectively on both the CPU and GPU. Once I run it and find it effective, I will report back in this issue.