LEANN revolutionizes personal AI with a compact vector database that enables efficient indexing and searching across vast amounts of documents using 97% less storage than traditional methods. Designed for complete privacy and optimized for personal use, it transforms any laptop into a powerful RAG system.
LEANN is an advanced vector database that empowers users to expand their personal AI capabilities efficiently. It allows the transformation of standard laptops into robust Retrieval-Augmented Generation (RAG) systems capable of indexing and searching through vast amounts of documents while achieving 97% less storage usage than conventional solutions—without compromising accuracy.
Efficient Storage: LEANN utilizes innovative graph-based selective recomputation and high-degree preserving pruning techniques to minimize storage requirements while maintaining accuracy in searches.
Privacy-Focused: Data remains entirely on personal devices with no reliance on cloud storage or external services, ensuring total privacy with no external data sharing involved.
High Portability: Users can easily transfer their entire knowledge base across devices with minimal effort, keeping their personal AI memory mobile.
Scalable Solutions: LEANN effectively handles vast and messy personal datasets that would overwhelm traditional vector databases, thereby accommodating the growing needs of users.
No Accuracy Loss: Users experience high-quality search results comparable to larger systems, all while being lightweight and requiring less memory.
LEANN enables users to implement RAG across a wide array of data sources, including:
.pdf, .txt, and .mdUsing LEANN is simplified through its declarative API, allowing users to perform tasks effectively:
from leann import LeannBuilder, LeannSearcher, LeannChat
from pathlib import Path
INDEX_PATH = str(Path("./").resolve() / "demo.leann")
# Build an index
builder = LeannBuilder(backend_name="hnsw")
builder.add_text("LEANN saves 97% storage compared to traditional vector databases.")
builder.build_index(INDEX_PATH)
# Search
searcher = LeannSearcher(INDEX_PATH)
results = searcher.search("fantastical AI-generated creatures", top_k=1)
# Chat with your data
chat = LeannChat(INDEX_PATH, llm_config={"type": "hf", "model": "Qwen/Qwen3-0.6B"})
response = chat.ask("How much storage does LEANN save?", top_k=1)
LEANN showcases remarkable performance in storage efficiency:
| System | DPR (2.1M) | Wiki (60M) | Chat (400K) | Email (780K) | Browser (38K) |
|---|---|---|---|---|---|
| Traditional vector database (e.g., FAISS) | 3.8 GB | 201 GB | 1.8 GB | 2.4 GB | 130 MB |
| LEANN | 324 MB | 6 GB | 64 MB | 79 MB | 6.4 MB |
| Savings | 91% | 97% | 97% | 97% | 95% |
As a lightweight, user-focused solution, LEANN sets itself apart by offering low-storage requirements and high performance, making it an excellent choice for personal AI applications across numerous data types. It invites all users to explore the potential of personal AI with enhanced privacy and efficient data handling.
No comments yet.
Sign in to be the first to comment.