tantaraio / voy

🕸️🦀 A WASM vector similarity search written in Rust
https://www.npmjs.com/package/voy-search
Apache License 2.0
866 stars 31 forks source link

use Rust embeddings crate #58

Open DougAnderson444 opened 4 months ago

DougAnderson444 commented 4 months ago

Hi :wave:

I see that your Readme says you want to move away from js embeddings such as web-ai to a Rust embedding library. Perhaps something like fastembed would work?

You didn't have anything on your project roadmap about rust embeddings (https://github.com/orgs/tantaraio/projects/2) so I thought I'd ask. Seems like it would be much fast as wasm than in js?

jacobhq commented 1 month ago

Sadly fastembed does not work in a webassembly context, and I'm not aware of any other ways to do this in rust, but it would be great if there was a way to do this. Let me know if you find anything, and I'd be happy to work on it in a PR.

jacobhq commented 1 month ago

Ok I've just submitted a PR (huggingface/candle#2363) that fixes the web assembly example of candle, a rust ML framework that can work in the browser. So now it is possible to embed text in the browser with rust.

If there's interest, I could implement embeddings in voy using candle in a PR.

PS - will be on holiday, so may not be able to work on stuff for ~2 weeks

DougAnderson444 commented 4 weeks ago

@jacobhq that's great news! Enjoy your vacation, look forward to seeing what you do when you return!

jacobhq commented 2 weeks ago

I've just tried to start work, and I've had a look through the examples, however I can't get any of them to work. I'm having the same issue as #57, at least in the create-wasm-app example. Did you manage to get anything working on your end?

DougAnderson444 commented 4 hours ago

No, I have not managed to find time for it yet