feat(logosdb): add LogosDB embedded vector database engine#297
Open
jose-compu wants to merge 2 commits into
Open
feat(logosdb): add LogosDB embedded vector database engine#297jose-compu wants to merge 2 commits into
jose-compu wants to merge 2 commits into
Conversation
- Implement LogosDB engine: LogosDBConfigurator, LogosDBUploader, LogosDBSearcher - DB path configured via connection_params.path (default /tmp/logosdb_vdb_bench) - max_elements configurable via collection_params (default 2,000,000) - Distance mapping: cosine → DIST_COSINE, dot → DIST_IP, l2 → DIST_L2 - Metadata sidecar (.meta.json) bridges configure → upload → search phases - Add experiment preset logosdb-m16-ef200 (glove-25-angular baseline) - Add logosdb>=0.9.0 to pyproject.toml dependencies Benchmark result (glove-25-angular, 1.18M vectors, dim=25, cosine): upload_time=345s rps=9401 mean_precision=0.939 p99=0.15ms Co-authored-by: Cursor <cursoragent@cursor.com>
for more information, see https://pre-commit.ci
Author
|
can you please review @fabriziobonavita @ankane @agourlay @timvisee thx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds LogosDB as a new engine — a fast, embedded HNSW vector store written in C/C++ with Python bindings, backed by memory-mapped binary storage and hnswlib.
LogosDBConfigurator— creates/recreates the local DB directory; writes a.meta.jsonsidecar withdim,distance, andmax_elementsfor use by the upload and search workers.LogosDBUploader— batch inserts viaput_batch; encodes each record's integer ID as the text field for recall retrieval.LogosDBSearcher— wrapsdb.search(), decodeshit.textback to integer ID.logosdb-m16-ef200targetingglove-25-angular.logosdb>=0.9.0added topyproject.toml.Design notes
connection_params.path.max_elements(HNSW pre-allocation) defaults to 2,000,000 and is configurable viacollection_params.cosine → DIST_COSINE,dot → DIST_IP,l2 → DIST_L2.parallel=1) this is safe. Multi-process search is not recommended with this engine.Benchmark result
Dataset:
glove-25-angular(1.18M vectors, dim=25, cosine) — Apple M-series, serial search:Test plan
pip install logosdbpython run.py --engines "logosdb-m16-ef200" --datasets "glove-25-angular"results/logosdb-m16-ef200-glove-25-angular-*.json