Disk indexing coming?
Closed this issue ยท 9 comments
Is disk storage for the indexes planned, or is it fast enough to use that the indexes can be built on every app launch?
Thanks to this PR you can save and load indexes on disk already #16
There's a few different options such as json or binary https://github.com/ZachNagengast/similarity-search-kit/tree/main/Sources/SimilaritySearchKit/Core/Persistence
Amazing thank you
While I'm here - it looks like this lib also needs upgrading to be able to support the new iOS 17 NLContextualEmbedding, is that correct? https://www.wwdcnotes.com/notes/wwdc23/10042/
Yep, there's a good example of some code using it in this repo apple/ml-stable-diffusion@7f9c58a#diff-fadaa8d2dd21c410a4f9ef64b9fa090799b8a2814bc6851408b3b29cf4f920a4
Thank you, I've seen this one example plus a couple articles in Japanese that discuss the code. However what I can't make sense of is how to go from having the contextual embeddings, to using them in a similarity search.
Do you plan to add this new API to this library? If so I'd just adopt the current embeddings options and offer the iOS 17 feature to capable devices later on. I'd help add it but don't understand how to generalize beyond using it as an input for SD. Thanks
I have a draft of this API that I'm hoping to finish up soon, FYI
FWIW I'm also now waiting for USearch to add text similarity search around end of this month, which is usable from Swift as well as WASM/others. Then I plan to use it with NLContextualEmbedding on iOS/mac, or something else for web deployment via SwiftWASM.
I just pushed #22 as a PR, if you can check it out and let me know how it works for you that would be helpful!
Merged #22 into main which contains this new embedding class.