← Back to Leaderboard
Zalibaba

alibaba/zvec

In-process C++ vector database for local hybrid retrieval

Engineering Health (Methodology)
A+ · 94/100
Maintenance Activity
● Updated today
Latest Release
v0.8.1
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption19/25
Release Cadence20/20
License Clarity20/20
Self-HostedLocal AI
Total Stars
★ 16,322
24h Growth
+7
7d Growth
+29
Forks
1,030

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

alibaba/zvec Star History (2026-01-02 - 2026-12-03) ALL-TIME STAR HISTORY (2026-01 – 2026-12) +16.3k in 335d · avg +49/day 17.2k 8.6k 0 2026-01-02: ★ 12026-01-24: ★ 272026-02-14: ★ 1,4722026-03-07: ★ 8,5682026-03-28: ★ 9,0162026-04-18: ★ 9,2942026-05-09: ★ 9,4602026-05-30: ★ 9,5962026-06-20: ★ 11,7392026-07-11: ★ 14,5982026-08-01: ★ 15,2172026-08-22: ★ 15,3912026-09-12: ★ 15,8172026-10-03: ★ 15,9962026-10-24: ★ 16,1062026-11-14: ★ 16,2292026-12-03: ★ 16,322 ★ 16.3k 2026-01 2026-06 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Zvec is a persistent, in-process retrieval engine, not a standalone database service. The C++ core lives under src/, with a top-level CMakeLists.txt and Python integration under python/. Python calls the native engine through pybind11. The Python flow is schema-first: declare the collection and vector field, open a collection at a filesystem path with zvec.create_and_open, insert zvec.Doc records, then query a field with zvec.Query and topk.

The host application supplies embeddings; Zvec handles local storage and retrieval. Write-ahead logging supports durability, and multiple processes can read the same collection while writes are exclusive to one process. SDKs give applications a way to embed the engine in different runtimes. If retrieval must be shared over the network, the application needs to expose and operate that service boundary.

Key Capabilities & Differentiators

Zvec supports dense and sparse embeddings, multi-vector queries, and hybrid retrieval that combines vector similarity, native full-text search, and structured filters. Full-text search runs on string fields and accepts natural-language or structured expressions. Since v0.8.0, the default Jieba dictionary and HMM model ship together, so Chinese tokenization needs no separate dictionary deployment.

HNSW, IVF, and DiskANN give teams index choices across memory- and disk-oriented workloads. v0.8.1 adds PQ4/PQ8 and optional OPQ to HNSW and IVF, covering training, search, persistence, and later updates. The cited GIST 1M benchmark setup uses L2 distance, INT8 quantization, and HNSW on a 16-core Linux ARM64 system. Treat that as one configuration, not a latency forecast for different data, hardware, or filters.

Trade-offs & Limitations

Compared with managed Pinecone, Zvec removes the network hop between the application and retrieval engine and lets you keep the collection local. The trade-off is ownership: your team provisions storage, tests backup and restore, and coordinates writes. Multiple reader processes do not imply multiple writers. If several services must ingest into one corpus, route updates through a designated writer or choose a deployment model that handles shared writes for you.

The engine also consumes resources on the same host as the application. Size for build and merge peaks as well as steady-state queries, and measure recall on representative queries before choosing a quantizer. Uniform quantization can speed search, but a shared min/max range can introduce more error and lower recall. The Python package is classified as Alpha; before a production rollout, exercise crash recovery and upgrades under your intended reader/writer workload.

Hardware & Deployment Guide

The shortest Python path is pip install zvec, followed by opening a collection on a writable local path. Use a supported 64-bit interpreter: installation guidance lists Python 3.10–3.14, while pyproject.toml declares a >=3.9 lower bound. Check wheel availability for the exact Python version, OS, and architecture rather than assuming that the metadata guarantees a compatible build. Java requires Java 8 or newer; official SDKs are also available for Node.js, Go, Rust, and Dart/Flutter.

There is no separate database daemon to deploy for embedded use. Retrieval can run offline if the collection and any upstream embedding dependencies are available locally. v0.8.0 added Intel Mac and Windows ARM64 builds, wheels, and SDKs, and reduced peak memory during IVF and DiskANN builds and merges. v0.8.1 expanded RaBitQ coverage to more platform combinations. Check the feature-level platform matrix before standardizing on an index or quantizer.

Execution model: Native C++ engine with pybind11 bindings; Python opens a collection at a local filesystem path.
Retrieval: Dense, sparse, and multi-vector queries alongside native full-text search and structured filters.
Chinese text search: v0.8.0 bundles the Jieba dictionary and HMM model, removing the need to provision them separately.
Index compression: v0.8.1 adds PQ4/PQ8 and optional OPQ for HNSW and IVF, covering training, search, persistence, and updates.
Concurrency and durability: WAL-backed persistence and concurrent readers across processes, with writes exclusive to one process per collection.
Build resource controls: v0.8.0 reduces peak memory during IVF and DiskANN builds and merges and tightens enforcement of configured build and training thread limits.
Best For

Local RAG, desktop or edge search, and application-owned retrieval where a designated writer can maintain the collection and hybrid search should run without a separate database service.

Skip If

Multiple services need to write independently to a shared corpus, or you need a managed remote database and do not want to own storage, recovery, and write coordination.

Reviewed on 2026-12-01 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedLocal AI
import zvec

# Define collection schema
schema = zvec.CollectionSchema(
    name="example",
    vectors=zvec.VectorSchema("embedding", zvec.DataType.VECTOR_FP32, 4),
)

# Create collection
collection = zvec.create_and_open(path="./zvec_example", schema=schema)

# Insert documents
collection.insert([
    zvec.Doc(id="doc_1", vectors={"embedding": [0.1, 0.2, 0.3, 0.4]}),
    zvec.Doc(id="doc_2", vectors={"embedding": [0.2, 0.3, 0.4, 0.1]}),
])

# Search by vector similarity
results = collection.query(
    zvec.Query(field_name="embedding", vector=[0.4, 0.3, 0.3, 0.1]),
    topk=10
)

# Results: list of {'id': str, 'score': float, ...}, sorted by relevance
print(results)

Comparison vs. Top RAG, Data & Memory Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
zvec ★16.3k+29C++Apache-2.0In-process C++ vector database for local hybrid retrieval
weaviate17k+17Go—Go vector database for filtered hybrid retrieval in production RAG stacks
qdrant35.9k+135RustApache-2.0Rust vector database for filtered and hybrid RAG retrieval
LightRAG41k+110PythonMITGraph-backed RAG for cross-document retrieval and multimodal indexing

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/alibaba/zvec.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

alibaba/zvec Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about zvec

How do I wire Zvec into an existing RAG pipeline?

Define a collection schema with a vector field that matches your embedding type and dimension. In Python, call zvec.create_and_open(...) with a local path, insert zvec.Doc records, and query with zvec.Query(...) and topk. The application supplies embeddings and passes retrieved results to the rest of the RAG pipeline; this integration does not require a separate database endpoint.

Does Zvec need a GPU, and what should I measure for sizing?

The demonstrated retrieval path takes precomputed vectors and does not require a GPU. Size host RAM and disk for the vector count, dimensions, index type, and concurrent workload. Measure peak memory during index builds and merges separately from steady-state query memory. If the same host runs an embedding model, budget its compute and any VRAM separately.

Can we embed Zvec in a commercial product and keep the data on our own infrastructure?

Apache-2.0 permits commercial use and self-hosting without a license fee. If you redistribute Zvec in a product, satisfy the license and notice requirements and review the obligations of dependencies shipped with it. Local execution gives you control over where the collection resides, but your application still owns access control, backups, and data handling.

When should we choose Pinecone instead of Zvec?

Zvec keeps retrieval inside the application process and allows only one writer process per collection. Pinecone is the managed-service alternative when you want a shared remote retrieval endpoint and prefer not to operate storage yourself. If your services need independent write access to one corpus, Zvec requires you to design and operate a write-coordination layer.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining alibaba/zvec? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature alibaba/zvec on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare