Experimental Multi-Vector Chamfer Distance with SIMD & BLAS Optimizations#730
Draft
suri-kumkaran wants to merge 6 commits intomainfrom
Draft
Experimental Multi-Vector Chamfer Distance with SIMD & BLAS Optimizations#730suri-kumkaran wants to merge 6 commits intomainfrom
suri-kumkaran wants to merge 6 commits intomainfrom
Conversation
hildebrandmw
reviewed
Feb 6, 2026
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.
Summary
Experimental multi-vector support with fast Chamfer distance for
f32embeddings and benchmarking infrastructure.Changes
Core Types
MultiVector- Row-major token embeddingsTransposedMultiVector- Block-transposed layout (16 vectors/block, SIMD-optimized)Chamfer<Approach>- Generic distance using Inner Product (implementsDistanceFunction)Implementations
NaiveApproach- Scalar baselineSimdApproach- SIMD viadiskann_vector::InnerProductTransposedApproach- Block-transposed SIMDTransposedWithTilingApproach- Query tiling (transposes docs, processes query pairs)QueryTransposedWithTilingApproach- Doc tiling (transposes query, processes doc pairs)SgemmApproach- BLAS SGEMM + SIMD row-max (via faer library)Benchmark Results (100 points, 10 iterations)
Machine: Intel Core i7-1365U, AVX2 supported, AVX-512 not supported, 32 GB RAM
Note: Times are median over 50 measurements, each measuring 10 consecutive distance computations across 100 points.
Speedup vs SIMD Baseline (Median, Lower Latency = Better)
Dimension 256
Dimension 384
Future Work
f16,u8quantized, etc.)Testing
cargo build --release -p multi-vector cargo run --release -p multi-vector --bin multivec-bench -- run \ --input-file multi-vector/examples/bench.json --output-file results.jsonContributing
This work is experimental and will be submitted as separate PRs.