orama
orama copied to clipboard
[feat] add binary quantization support vector search
Problem Description
Currently it seems like vector search applies cosine similarity search and may be good for other embedding types (binary or int8) support via other search algorithms like hamming_distance
Proposed Solution
We should implement SIMSIMD or this vanilla js function that is discussed here
https://github.com/xenova/transformers.js/issues/681
Alternatives
No response
Additional Context
It will be beneficial for local-first applications to use binary quantized embeddings to reduce the load on memory and support vector search that way. Will be interesting to see stress test on this.
I've seen some of the source code for orama and seems like this can be supported via an extension so I perhaps could tackle this.
However given its a single function + proposal to add types to the API it may be a simple 30 line change.
We can make this happen via plugins, but it will likely require running a model on your browser, which will slow down a lot the initialization process. For now, we're providing fast vector/hybrid search support on Orama Cloud (https://cloud.orama.com) and won't be focusing on supporting local models... but this may change in the future. PRs are obviously welcome even as a PoC!