Comments (5)
Thanks so much for initiating this work in #77. I would love to be able to help out with this endeavour. I'll base my changes on top of change/faiss-v1.8.0
, and try to design the unsafe boundaries following patterns from src/index/*.rs
.
Not sure if I'm tall enough to write unsafe Rust but I'll give it a shot anyway. Your reviews and guidance will always be appreciated!
from faiss-rs.
Thank you for your interest in these bindings!
While this crate builds against a version of Faiss with support for binary indexes, it is worth remembering that it targets the C API exclusively. Faiss did not support binary indexes when I first worked on the C API, and this API is not updated in lockstep with the rest of the library. In other words, the work on extending faiss-rs to support binary indexes needs to start at the main Faiss repository. I happen to have found a tracking issue. Should you be interested in fulfilling this, I can provide some assistance there.
from faiss-rs.
Oh, my mistake, turns out that Faiss already has its C API extended to support binary indexes. So at this end, what we need to do is:
- Checkout a more recent version of the Faiss library;
- Regenerate the low-level bindings in
faiss-sys
; - Design a high level API here in the
faiss
crate.
from faiss-rs.
Okay! There's some careful copypasta work in #79 that covers the base BinaryIndexImpl
and all the core *Index*
traits and macros are replicated and adapted for BinaryIndex
es. Not so sure about the naming convention we wanna go ahead with but my current assumption is to prefix the concrete impls with Binary
(i.e. IndexFlat
-> BinaryIndexFlat
).
PS: This is my first foray into getting C++ to behave nicely with Rust so some things could be broken but I have to say this project is so well written/maintained that suprisingly, I'm having a pleasant time getting it all working together (barring my broken cublas install on Fedora 38 which forces me to generate bindings on a nvidia/cuda:12.3.2-devel-ubi8
docker container). Also, cargo build
seems to be happy with these changes so maybe I'm headed in the right direction after all?
from faiss-rs.
On a second thought, I'll keep the naming convention the same as the C++ api (i.e. IndexFlat
-> IndexBinaryFlat
)
from faiss-rs.
Related Issues (20)
- Improve PreTransformIndex and update Clustering types HOT 1
- Macros to derive crate
- Support faiss_index_gpu_to_cpu in GpuIndexImpl HOT 2
- Use cxx for interop with Faiss HOT 1
- Slow training IVF indexes HOT 13
- Control over GPU <-> CPU result copies? HOT 1
- Memory leak detected. HOT 4
- Update C-API v1.7.2 HOT 1
- Save and reopen Index after train()? HOT 1
- read_index io flag support HOT 3
- Undefined symbols for architecture arm64
- panicked at 'too large index value provided to Idx::new' HOT 4
- Write Index into memory or Read Index from memory HOT 1
- Does this crate plan to support generic IO? HOT 1
- Can you also add support for static libraries? HOT 6
- Updating to latest faiss? HOT 9
- Support for mac m1? HOT 7
- confusing build linker error HOT 2
- `&mut self` argument on `index.search` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faiss-rs.