AlayaLite – A Fast, Flexible Vector Database for Everyone.
Seamless Knowledge, Smarter Outcomes.
- High Performance: Modern vector techniques integrated into a well-designed architecture.
- Elastic Scalability: Seamlessly scale across multiple threads, which is optimized by C++20 coroutines.
- Adaptive Flexibility: Easy customization for quantization methods, metrics, and data types.
- Ease of Use: Intuitive APIs in Python.
Get started with just one command!
pip install alayalite # install the python package.
Access your vectors using simple APIs.
from alayalite import Client, Index
from alayalite.utils import calc_recall, calc_gt
import numpy as np
# Initialize the client and create an index. The client can manage multiple indices with distinct names.
client = Client()
index = client.create_index("default")
# Generate random vectors and queries, then calculate the ground truth top-10 nearest neighbors for each query.
vectors = np.random.rand(1000, 128).astype(np.float32)
queries = np.random.rand(10, 128).astype(np.float32)
gt = calc_gt(vectors, queries, 10)
# Insert vectors to the index
index.fit(vectors)
# Perform batch search for the queries and retrieve top-10 results
result = index.batch_search(queries, 10)
# Compute the recall based on the search results and ground truth
recall = calc_recall(result, gt)
print(recall)
We evaluate the performance of AlayaLite against other vector database systems using ANN-Benchmark (compile locally and open -march=native
in your CMakeLists.txt
to reproduce the results). Several experimental results are presented below.
![]() |
![]() |
---|---|
GloVe-25 Angular |
SIFT-128 Euclidean |
We welcome contributions to AlayaLite! If you would like to contribute, please follow these steps:
- Start by creating an issue outlining the feature or bug you plan to work on.
- We will collaborate on the best approach to move forward based on your issue.
- Fork the repository, implement your changes, and commit them with a clear message.
- Push your changes to your forked repository.
- Submit a pull request to the main repository.
Please ensure that your code follows the coding standards of the project and includes appropriate tests.
We would like to thank all the contributors and users of AlayaLite for their support and feedback.
If you have any questions or suggestions, please feel free to open an issue or contact us at [email protected].