12 comments

  • kelindar 2 days ago

    This library was created to provide an easy and efficient solution for embeddings and vector search, making it perfect for small to medium-scale projects that still need some vector search. It's built around a simple idea: if your dataset is small enough, you can achieve accurate results with brute-force techniques, and with some optimizations like SIMD, you can keep things fast and lean.

    • biomcgary 7 hours ago

      I love that you chose to wrap the C++ with purego instead of requiring CGO! I wrapped Microsoft's Lightgbm library and found purego delightful. (To make deployment easier, I embed the compiled library into the Go binary and extract it to a temp directory at runtime. YMMV.)

      • cyberax 5 hours ago

        This post led me to purego, and I've just finished moving my toy project that uses PKCS#11 libraries from cgo to it. It's so much better now! No need to jump through hoops for cross-compilation.

        • mappu 4 hours ago

          IME Linux and macOS users usually have a compiler available so CGO is mostly only a hassle for Windows, but on Windows this capability is built into the Go stdlib, e.g. `syscall.NewLazyDLL("msvcrt.dll").MustFindProc(...)`

    • jerrygenser 4 hours ago

      Have you considered using HNSW instead of brute force?

  • huac 3 hours ago

    nice work! I wrote a similar library (https://github.com/stillmatic/gollum/blob/main/packages/vect...) and similarly found that exact search (w/the same simple heap + SIMD optimizations) is quite fast. with 100k objects, retrieval queries complete in <200ms on an M1 Mac. no need for a fancy vector DB :)

    that library used `viterin/vek` for SIMD math: https://github.com/viterin/vek/

  • ausbah 3 hours ago

    could anyone recommend a similar library for python?

  • fjuafhwasd 3 hours ago

    Do these queries complete within 10ms?

  • 38 5 hours ago

    > git submodule update --init --recursive

    nope. this looks cool, but Git submodules are cursed

    • IncreasePosts 4 hours ago

      I think you mean recursed

    • o11c 3 hours ago

      Dip it in a blessed clear potion.