kaivalnp commented on PR #16665:
URL: https://github.com/apache/lucene/pull/16665#issuecomment-5669950142
Nice catch! The fix LGTM at first glance..
I'm curious, how did you come across this issue?
---
Just to test it out, I performed a `luceneutil` KNN benchmark on Cohere v3
vectors, 1024 dimensions, 100K docs, 10K queries, `COSINE` similarity,
`tinySegmentsThreshold = 0`, force merged to single segment.
Additional change: multiply each document vector by 5 (ideally should
**not** change KNN results for `COSINE` similarity, but needed to exercise the
bug here, because input vectors are already unit normal).
`main`:
```
quantized visited index(s) index_docs/s merge(s) force_merge(s)
index_size(MB) vec_disk(MB) vec_RAM(MB) recall latency(ms) netCPU
1 bits 3945 20.14 4966.23 5.60 9.58
406.05 404.167 13.542 0.072 0.481 0.481
2 bits 3929 20.39 4903.88 6.41 10.95
418.41 416.374 25.749 0.068 0.628 0.628
```
This PR:
```
quantized visited index(s) index_docs/s merge(s) force_merge(s)
index_size(MB) vec_disk(MB) vec_RAM(MB) recall latency(ms) netCPU
1 bits 8460 20.62 4849.66 11.61 17.45
417.91 404.167 13.542 0.671 1.077 1.077
2 bits 7420 21.02 4756.92 13.21 20.60
428.98 416.374 25.749 0.793 1.488 1.487
```
---
I feel like this bug-fix is worth including in 10.5.2 (cc @msokolov)
Also cc @mccullocht for visibility / input.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]