NanoVector v0.1.2 — Interactive Google Colab Support & Python 3.9 Compatibility
Описание и применение
NanoVector — компактная библиотека поиска векторов для Python, обеспечивающая мгновенную загрузку, точный поиск и одностраничное хранение, что упрощает разработку LLM‑агентов и систем RAG.
Задача
Python developers building LLM agents or local RAG systems face heavy vector database dependencies (e.g., chromadb, FAISS) that inflate package size, slow cold starts, and add complex transitive dependencies.
Результат
NanoVector achieves 3,000× faster import, 0.13 ms search latency for 2,000 vectors, 1,414,000 vectors/sec ingestion, and single‑file persistence, outperforming ChromaDB and FAISS on small‑to‑medium workloads.
Рабочий процесс
- Install NanoVector via pip:
pip install nanovector - Create an Index:
index = nanovector.Index(dim=384, metric="cosine") - Add embeddings with metadata:
index.add("doc_1", vec, metadata="{\"title\": \"NanoVector Launch\", \"author\": \"eminsk\"}") - Search top‑k results:
results = index.search(query, top_k=5) - Print results: iterate over
resultsand accessr.id,r.score,r.metadata - Persist index to disk:
index.save("memory.nvec") - Reload index:
loaded = nanovector.load("memory.nvec")
Доказательства
Wheel Download Size: NanoVector 38 KB (~120 KB unpacked) vs ChromaDB ~120 MB+
Python Cold Import Time: NanoVector 0.6 ms (3,000× faster) vs ChromaDB 1,850 ms
- Дата записи: 2026-09-16T08:00:40.082Z