blevesearch / zapx

Zap file format compatible with a future version of Bleve
Apache License 2.0
11 stars 12 forks source link

Use of IVF with HNSW32 coarse quantizer #243

Open abhinavdangeti opened 4 months ago

abhinavdangeti commented 4 months ago

Bringing back the coarse quantizer into use per observations Aditi recorded earlier. A slight adjustment now is to deploy it only over a vector count of 100000.

abhinavdangeti commented 4 months ago

@metonymic-smokey would you share the numbers you have comparing the considered index classes for this doc count at the unit level.

metonymic-smokey commented 4 months ago

Numbers from go-faiss unit level testing -

nq = 100, k = 100

256 dims

nvecs
QPS without HNSW QPS with HNSW
200k 425 311
500k 257 244
1M 170 145

512 dims

nvecs
QPS without HNSW QPS with HNSW
1M 75 62

1024 dims

nvecs
QPS without HNSW QPS with HNSW
1M 20 15

2048 dims

nvecs
QPS without HNSW QPS with HNSW
200k 14 5
500k 11 5
1M 9 4

These numbers were prior to the latest go-faiss PRs being merged. I'm not sure that 100k is a high enough number to use the coarse quantiser and the number should depend on the dims too since it's most effective for high dims.

abhinavdangeti commented 4 months ago

Hmm, but per the numbers you've shared it seems even at higher dims the QPS seems to fall with the coarse quantizer?