Add a SIMD (Neon) optimised vector distance function for int8#106133
Merged
ChrisHegarty merged 79 commits intoelastic:mainfrom Apr 12, 2024
Merged
Add a SIMD (Neon) optimised vector distance function for int8#106133ChrisHegarty merged 79 commits intoelastic:mainfrom
ChrisHegarty merged 79 commits intoelastic:mainfrom
Conversation
benwtrent
reviewed
Mar 8, 2024
...r/src/main/java/org/elasticsearch/index/codec/vectors/ES814ScalarQuantizedVectorsWriter.java
Show resolved
Hide resolved
bee9574 to
db1e258
Compare
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
Contributor
Author
|
@elasticmachine update branch |
Collaborator
|
@ChrisHegarty according to this PR's labels, I need to update the changelog YAML, but I can't because the PR is closed. Please either update the changelog yourself on the appropriate branch, or adjust the labels. Specifically:
|
1 similar comment
Collaborator
|
@ChrisHegarty according to this PR's labels, I need to update the changelog YAML, but I can't because the PR is closed. Please either update the changelog yourself on the appropriate branch, or adjust the labels. Specifically:
|
ChrisHegarty
added a commit
that referenced
this pull request
Apr 16, 2024
This was referenced Apr 23, 2024
Contributor
Author
|
Pasting some benchmark results here, for reference: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds an optimised int8 vector distance implementation for aarch64. Additional platforms like, say, x64, will be added as a follow-up.
The vector distance implementation outperforms Lucene's Pamana Vector implementation for binary comparisons by approx 5x (depending on the number of dimensions). It does so by means of SIMD (Neon) intrinsics compiled into a separate native library and link by Panama's FFI. Comparisons are performed on off-heap mmap'ed vector data.
The implementation is currently only used during merging of scalar quantized segments, through a custom format
ES814HnswScalarQuantizedVectorsFormat, but its usage will likely be expanded over time.https://www.elastic.co/search-labs/blog/vector-similarity-computations-ludicrous-speed