Skip to content

Fp16 re ranking and prefetch support - #16628

Merged
msokolov merged 3 commits into
apache:mainfrom
Pulkitg64:fp16-re-ranking
Sep 28, 2026
Merged

msokolov merged 3 commits into
apache:mainfrom
Pulkitg64:fp16-re-ranking

Conversation

@Pulkitg64

Copy link
Copy Markdown
Contributor

Description

We are adding FP16 support in Lucene. In #16383 we added the initial fp16 encoding and in #16473 we added scalar quantization support. This PR adds the re-ranking, approximate similarity, and prefetch support that already exist for the fp32 format.

@Pulkitg64 Pulkitg64 changed the title Fp16 re ranking Fp16 re ranking and prefetch support Sep 3, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Sep 19, 2026
@goankur

goankur commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@Pulkitg64 heads up — #16705 changes KnnVectorValues#prefetch so that prefetch(int ord, int count) is the primitive and the int[] form coalesces consecutive ordinals over it. That touches OffHeapFloat16VectorValues, RescoreTopNQuery, FullPrecisionFloatVectorSimilarityValuesSource and TestOffHeapVectorValues, which this PR also changes.

Whichever lands second will need a small rebase. If #16705 goes first, the array-form prefetch
override this PR adds to OffHeapFloat16VectorValues collapses into the inherited coalescing
implementation, so it would be strictly less code — happy to do that rebase for you. Ordering the
other way works too, I would just forward prefetch(int ord, int count) from the fp16 wrapper.

@Pulkitg64

Copy link
Copy Markdown
Contributor Author

Thanks @goankur for the heads up.

@msokolov

Copy link
Copy Markdown
Contributor

I have some (not actionable) nits about naming; otherwise this looks like a straightforward extension of existing APIs, +1. I'll merge soon; we'll see if the prefetch changes get in first :)

@Pulkitg64

Copy link
Copy Markdown
Contributor Author

Thanks Mike!

@msokolov
msokolov merged commit 55fd2e7 into apache:main Sep 28, 2026
12 checks passed
@Pulkitg64
Pulkitg64 deleted the fp16-re-ranking branch October 7, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants