Allow for different query bit sizes for asymmetric quantized vector indices
Description
I have noticed some interesting results where:
- 4 bit queries are actually way too much information and even single bit is good enough
- having 8 bit queries can really help refine results, kick starting a refining process.
I wonder if we can expose a parameter or something at query time?
It gets tricky as it pre-supposes there is an "optimized" way to do variable bit queries of certain sizes. I also suspect we will want to restrict it to 1, 2, 4, 8 query bits against a quantized index.
Would we also want to restrict it to where the query bits are always larger than the encoding bits? (I would suspect so...).
It SEEMS the best place to have this configuration would be within the "SearchStrategy" interface. This can give hints from the query to the format on how things should be done.
Hello maintainers 👋,
I’d like to work on this issue — PLEASE ASSIGN THIS ISSUE TO ME
Proposed direction
It seems the best place for this configuration would be the SearchStrategy interface, allowing the query layer to provide hints to the format about:
desired query bit width
whether the query is intended for coarse recall vs refinement
This would keep the logic centralized, avoid leaking query-specific tuning into lower-level components, and allow future experimentation without API churn.
If this direction sounds reasonable, I’m happy to prototype an API shape, validate constraints, and report back with benchmarks and follow-up PRs.
Thanks!
@ML-dev-crypto I enjoy your eagerness, but one item at a time is perfect. Simply taking all open issues seems unfair to all other potential contributors.
Hey @benwtrent, would it be ok if I worked on this?
This seems really interesting, but being mindful of the scope, I’d like to keep it incremental across a couple of small PRs.
As a first step, I just wanted to ask: would it make sense to start with passing an optional “query bit size” hint through SearchStrategy (without changing scoring yet), or is there a specific scorer/format path you’d recommend starting with?
Happy to begin with whatever smallest useful piece makes sense.
@arup-chauhan I do think the "SearchStrategy" is the place to dig into first.
@arup-chauhan I do think the "SearchStrategy" is the place to dig into first.
Hey @benwtrent, thank you. I will create a draft PR and get started. Also, I will keep reaching out to you for the feedback, hope that is ok.