voy icon indicating copy to clipboard operation
voy copied to clipboard

use Rust embeddings crate

Open DougAnderson444 opened this issue 1 year ago • 5 comments

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?

DougAnderson444 avatar May 01 '24 21:05 DougAnderson444

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 avatar Jul 20 '24 11:07 jacobhq

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

jacobhq avatar Jul 28 '24 10:07 jacobhq

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

DougAnderson444 avatar Aug 10 '24 01:08 DougAnderson444

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?

jacobhq avatar Aug 20 '24 14:08 jacobhq

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

DougAnderson444 avatar Sep 07 '24 14:09 DougAnderson444