Skip to content

Explore more granular vector quantization? #15734

@kaivalnp

Description

@kaivalnp

Description

Today, Lucene supports 8, 4, 2 and 1 bit quantization.

Each quantization level typically has an upper bound of recall with exact KNN that it can produce (which is "exact KNN with quantized scores" v/s "exact KNN with original scores", see mikemccand/luceneutil#528) -- this is the information loss due to quantization itself (before approximate-ness from search algorithms like HNSW comes into picture).

Any algorithm operating on quantized scores alone cannot go beyond this recall (e.g. tweaking parameters like maxConn, beamWidth, fanout, etc. for HNSW) without using the original scores from un-quantized vectors for re-ranking -- which may not be feasible for some use cases (e.g. keeping the index in-memory for performance, where using un-quantized vectors increases memory footprint by ~4x in case of byte-quantized vectors).

In such cases, I wonder if Lucene could support more granular quantization options (say the equivalent of! 6-bit quantization) -- for more granular recall v/s memory requirements?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions