lucene icon indicating copy to clipboard operation
lucene copied to clipboard

Examine adding more off-heap vector scoring

Open ChrisHegarty opened this issue 1 year ago • 1 comments

This issue has been filed to give consideration to the possibility of adding more off-heap vector scorers.

We recently added a MemorySegment Vector scorer for scoring byte vectors without copying on-heap - scorer loads values directly from the backing memory segment when available. Benchmarks show an approx 2x performance improvement by avoiding copying the vector data on-heap.

Floats

Loading vector data from float[] (the fallback), is only supported in JDK 22 - which might be fine. See https://bugs.openjdk.org/browse/JDK-8318678

Scalar quantized

Each of the possible quantized vector element sizes can be evaluated separately.

  • int7
  • int4
  • 1 bit ?

relates #13339

ChrisHegarty avatar Jun 21 '24 15:06 ChrisHegarty

This relates to: https://github.com/apache/lucene/pull/13497

benwtrent avatar Jun 21 '24 18:06 benwtrent

FYI I opened #14863 for off-heap quantized scoring, would appreciate reviews!

kaivalnp avatar Jun 29 '25 10:06 kaivalnp