Closed devilztt closed 4 months ago
I also encountered the same question, please take a look of it, thanks. @mdouze @devilztt @tomdyson @ot @lsb @benfred
things to look at:
Reduce nprobe can make it quick a little, but still slow, if set nprobe = 1, the acc is too low. Why is setting it to 10 so slow, my nlist = 100 . The data is random, but even when I use real data, the results are similar. I think it has nothing to do with the proportion of the data. And I print index.invlists.imbalance_factor() = 1.06509302. I have tried using Conda to install it, but it is also the same problem, that is, using C++as an example, compiling with the addition of the mkl library is the same I want to know if you have tried this before. Currently, as long as I use a CPU platform, the results are the same. As long as I use a math library, IVFFlat is much slower than FlatL2.
I want to know if you have tried this before. Currently, as long as I use a CPU platform, the results are the same. As long as I use a math library, IVFFlat is much slower than FlatL2.
Summary
faiss.IndexIVFFlat is slower than faiss.IndexFlatIP, I dont know why , the numpy installed like "pip install intel-numpy" faiss installed like "pip install faiss-cpu", whatever windows or linux , always slow
Running on:
Interface:
the result like this [ 5 1894 2280 5111 10577 11089 14732 18807 18967 21015 23812 24122 28390 34554 35481 35825 36582 36676 38201 41180 43978 45719 52503 53086 60008 64889 66976 70646 72942 73486 74631 75932 79380 79633 80082 86244 90109 93231 94581 94660 100069 101279 106608 108983 109923 110811 111534 114150 115507 120026 121706 121856 122207 128322 130886 132046 132558 132770 135639 136214 138723 139387 140430 143404 143824 147467 150482 154372 159113 161653 162230 163741 164281 171253 175471 181143 188320 190826 196939 198481] 68.06165814399719 train time 0.2234022617340088 add time 0.1904909610748291 [ 5 649 2003 2592 5275 5722 6303 8940 14659 14732 16775 17021 18792 18967 21015 23812 26365 27189 27495 28345 28839 30134 31050 34804 37239 37717 38332 41180 47334 50602 51536 52664 53286 55272 58175 58839 61951 68532 70991 74631 75405 75932 83016 88473 91417 92814 97242 100885 110811 111843 115925 116086 117007 120136 121706 125411 125960 127650 139682 140102 147988 154360 159113 160612 163741 164281 165284 181111 181976 186438 188130 188616 190336 191513 192460 192993 193155 193458 197498 199241] 222.23961925506592