[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 IVF nlist access (#266)
Yichuan Wangc77fa9eb796d
diff --git a/packages/leann-backend-ivf/leann_backend_ivf/ivf_backend.py b/packages/leann-backend-ivf/leann_backend_ivf/ivf_backend.pyindex 9ca45c1..0f7e69f 100644--- a/packages/leann-backend-ivf/leann_backend_ivf/ivf_backend.py+++ b/packages/leann-backend-ivf/leann_backend_ivf/ivf_backend.py@@ -171,8 +171,9 @@ class IVFSearcher(BaseSearcher):query = query.astype(np.float32)if self.distance_metric == "cosine":query = _normalize_l2(query)- nprobe = nprobe or min(complexity, self._index.nlist)- self._index.nprobe = nprobe+ ivf_index = faiss.extract_index_ivf(self._index)+ nprobe = nprobe or min(complexity, ivf_index.nlist)+ ivf_index.nprobe = nprobedistances, label_rows = self._index.search(query, top_k)def map_label(x: int) -> str: