[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
Python aifaissgpt-osslangchainllama-indexllmlocalstorageoffline-firstollamaprivacypythonragretrieval-augmented-generationvector-databasevector-searchvectors
fix file path bug still compatiable bug in hnsw search
yichuan520030910320a627abe79435
diff --git a/examples/main_cli_example.py b/examples/main_cli_example.pyindex be0cf96..e58b3f9 100644--- a/examples/main_cli_example.py+++ b/examples/main_cli_example.py@@ -7,7 +7,7 @@ import asyncioimport osimport dotenvfrom leann.api import LeannBuilder, LeannSearcher, LeannChat-import leann_backend_diskann # Import to ensure backend registration+import leann_backend_hnsw # Import to ensure backend registrationimport shutilfrom pathlib import Path@@ -50,7 +50,7 @@ if INDEX_DIR.exists():print(f"\n[PHASE 1] Building Leann index...")builder = LeannBuilder(- backend_name="diskann",+ backend_name="hnsw",embedding_model="facebook/contriever", # Using a common sentence transformer modelgraph_degree=32,complexity=64diff --git a/packages/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.py b/packages/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.pyindex 740678c..8901f00 100644--- a/packages/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.py+++ b/packages/leann-backend-hnsw/leann_backend_hnsw/hnsw_backend.py@@ -151,7 +151,7 @@ class HNSWBackend(LeannBackendFactoryInterface):@staticmethoddef searcher(index_path: str, **kwargs) -> LeannBackendSearcherInterface:path = Path(index_path)- meta_path = path.parent / f"{path.stem}.hnsw.meta.json"+ meta_path = path.parent / f"{path.name}.meta.json"if not meta_path.exists():raise FileNotFoundError(f"Leann metadata file not found at {meta_path}. Cannot infer vector dimension for searcher.")diff --git a/packages/leann-backend-hnsw/third_party/faiss b/packages/leann-backend-hnsw/third_party/faissindex b906cee..2365db5 160000--- a/packages/leann-backend-hnsw/third_party/faiss+++ b/packages/leann-backend-hnsw/third_party/faiss@@ -1 +1 @@-Subproject commit b906ceeb8f93c589545b47bef697a993ca9ef9a0+Subproject commit 2365db59a7ba253e8b075fbfa43a5c0d15dbda84diff --git a/test_pdf_index/pdf_documents.leann.meta.json b/test_pdf_index/pdf_documents.leann.meta.jsonindex 38b478b..0fe5af0 100644--- a/test_pdf_index/pdf_documents.leann.meta.json+++ b/test_pdf_index/pdf_documents.leann.meta.json@@ -1,6 +1,6 @@{"version": "0.1.0",- "backend_name": "diskann",+ "backend_name": "hnsw","embedding_model": "facebook/contriever","num_chunks": 826,"chunks": [