lanterndata / lantern

PostgreSQL vector database extension for building AI applications
https://lantern.dev
Other
742 stars 52 forks source link

Lantern’s Performance vs. pgvector - Authenticity and Future Improvements #272

Open Haskely opened 7 months ago

Haskely commented 7 months ago

Hi Lantern Team,

I noticed your commitment to performance excellence in the README. However, a comparison on tembo.io (https://tembo.io/blog/postgres-vector-search-pgvector-and-lantern) suggests Lantern falls behind pgvector in certain metrics.

image

Could you comment on:

Looking forward to your insights.

Ngalstyan4 commented 7 months ago

Hi @Haskely,

Thanks your interest in lantern and for commenting on this! You are right that the benchmarks in the Readme are out of date. Tembo's findings seem reasonable.

We are doing a major upgrade of lantern with improved storage layer (see PR1, PR2). I think pgvector will soon release parallel index builds, which we can compare to our external parallel index builds. pgvector has merged improvements on this front as well since we last benchmarked it and plan to rerun all those benchmarks after their next release.

So, we are working on improvements but I won't promise anything here and will let the benchmarks speak for themselves once they are out (will be within 10 days).

In particular, we are working on supporting the new hardware optimizations from usearch, enabling cpu-specific build flags, adding vector quantization techniques.

In the meantime, here are some of the reasons you might still want to consider lantern:

valentijnvenus commented 7 months ago

@Ngalstyan4 thanks for the update:

In particular, we are working on supporting the new hardware optimizations from usearch, enabling cpu-specific build flags, adding vector quantization techniques.

I guess it is not as simple as updating the third_partry folder to point to a recent USearch?

Ngalstyan4 commented 7 months ago

Right. For details on what it involves, you can look at unum-cloud/usearch#335 adding storage interface, and #262, building on that interface

valentijnvenus commented 1 month ago

Any news on leveraging AVX512 USearch improvements? I see the external usearch dependency was updated recently