Zvec:轻量级、快速的进程内向量数据库
Zvec: A lightweight, fast, in-process vector database

原始链接: https://github.com/alibaba/zvec

## Zvec:快速的、进程内向量数据库 Zvec是一个轻量级、开源的向量数据库,设计用于直接集成到应用程序中。它基于阿里巴巴的Proxima引擎构建,提供生产就绪、低延迟的相似性搜索,而无需服务器设置的复杂性。 主要特性包括:**极快的**数十亿向量搜索,支持**稠密和稀疏向量**(包括多向量查询),以及将语义搜索与**结构化过滤**(混合搜索)相结合的能力。 Zvec直接在您的应用程序内运行——笔记本电脑、服务器,甚至边缘设备——目前支持Linux和macOS上的Python 3.10-3.12。它使用起来非常简单:安装、定义模式、插入数据,并使用几行代码进行查询。 详细的性能基准测试可用,该项目欢迎社区贡献。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Zvec:一种轻量级、快速的、进程内向量数据库 (github.com/alibaba) 9 分,来自 dvrp 1小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 https://zvec.org/en/ clemlesne 19分钟前 [–] 有人和 uSearch (https://github.com/unum-cloud/USearch) 比较过吗?回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Linux x64 CI Linux ARM64 CI macOS ARM64 CI
Code Coverage PyPI Release Python Versions License

🚀 Quickstart | 🏠 Home | 📚 Docs | 📊 Benchmarks | 🎮 Discord | 🐦 X (Twitter)

Zvec is an open-source, in-process vector database — lightweight, lightning-fast, and designed to embed directly into applications. Built on Proxima (Alibaba's battle-tested vector search engine), it delivers production-grade, low-latency, scalable similarity search with minimal setup.

  • Blazing Fast: Searches billions of vectors in milliseconds.
  • Simple, Just Works: Install and start searching in seconds. No servers, no config, no fuss.
  • Dense + Sparse Vectors: Work with both dense and sparse embeddings, with native support for multi-vector queries in a single call.
  • Hybrid Search: Combine semantic similarity with structured filters for precise results.
  • Runs Anywhere: As an in-process library, Zvec runs wherever your code runs — notebooks, servers, CLI tools, or even edge devices.

Requirements: Python 3.10 - 3.12

  • Linux (x86_64, ARM64)
  • macOS (ARM64)

🛠️ Building from Source

If you prefer to build Zvec from source, please check the Building from Source guide.

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.VectorQuery("embedding", vector=[0.4, 0.3, 0.3, 0.1]),
    topk=10
)

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

📈 Performance at Scale

Zvec delivers exceptional speed and efficiency, making it ideal for demanding production workloads.

Zvec Performance Benchmarks

For detailed benchmark methodology, configurations, and complete results, please see our Benchmarks documentation.

Stay updated and get support — scan or click:

We welcome and appreciate contributions from the community! Whether you're fixing a bug, adding a feature, or improving documentation, your help makes Zvec better for everyone.

Check out our Contributing Guide to get started!

联系我们 contact @ memedata.com