milvus-lite  by milvus-io

Lightweight, local vector database for AI development and testing

Created 4 years ago
443 stars

Top 66.9% on SourcePulse

GitHubView on GitHub
Project Summary

Milvus Lite provides a lightweight, pure Python implementation of Milvus for local development, testing, and small-scale AI applications. It offers a familiar pymilvus API, enabling seamless code migration to larger Milvus deployments or Zilliz Cloud, while simplifying local prototyping and notebook experimentation.

How It Works

This version is rebuilt from scratch in pure Python, eschewing C++ core wrappers for a local LSM-tree storage engine. It utilizes Write-Ahead Logging (WAL), in-memory memtables, immutable Parquet segments, and segment-level FAISS indexes. The architecture supports dense vector search, sparse BM25 full-text search, and hybrid search, all managed through a Milvus-compatible gRPC adapter. This approach offers inspectable code and Python stack traces, enhancing developer experience for local workloads.

Quick Start & Requirements

  • Installation: Install via pip: pip install -U milvus-lite or pip install -U "pymilvus[milvus-lite]". Note that .db files from the original C++/CGo milvus-lite are incompatible; data must be re-imported.
  • Prerequisites: Python 3.10 or newer. Core dependencies (pyarrow, numpy, faiss-cpu, grpcio) are installed by default. Compatible with macOS, Linux, and Windows.
  • Usage: Can be used directly via MilvusClient("./demo.db") for local file-based storage or started as a standalone gRPC server using milvus-lite server.

Highlighted Details

  • Pure Python implementation with inspectable code.
  • Drop-in local usage via MilvusClient("./demo.db").
  • Supports dense vector search, sparse BM25 search, and hybrid search.
  • Milvus-compatible API and features (scalar filters, dynamic fields, partitions, etc.).
  • LSM-tree storage engine with immutable Parquet segments.
  • FAISS-backed indexes (HNSW, IVF_FLAT, etc.) and SPARSE_INVERTED_INDEX.

Maintenance & Community

The project welcomes contributions via issues and pull requests, with guidelines provided in CONTRIBUTING.md. Specific community channels (e.g., Discord, Slack) or notable contributors/sponsorships are not detailed in the README.

Licensing & Compatibility

Milvus Lite is licensed under the Apache License 2.0. Its API compatibility allows code written for Milvus Lite to be easily adapted for Milvus Standalone, Milvus Distributed, or Zilliz Cloud, facilitating a smooth transition from development to production environments.

Limitations & Caveats

Milvus Lite is designed for local development and small-scale workloads, not distributed production serving. It enforces a single process per data_dir via file locking and supports only a single logical database namespace. Features like authentication, user management, RBAC, specific vector field types (binary, float16, bfloat16), and Product Quantization indexes are not supported. BM25 IDF statistics are segment-local.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
0
Star History
7 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.