AI Open Source · RAG 与检索
milvus-io/milvus
云原生的高性能向量数据库,专攻大规模向量近似最近邻搜索。底层支持 DiskANN、 Faiss 等多种索引,分布式架构能扛住十亿级 embedding 的检索负载。生物医药文本 检索、跨模态相似性搜索、企业级 RAG 后端常用它做向量存储层。
Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search
- Repo
- milvus-io/milvus
- Stars
- ★ 44k
- Language
- Go
- License
- Apache-2.0
- Last push
- today
- Created
- 2019-09-16
- Topics
- annscloud-nativediskanndistributedembedding-databaseembedding-similarity
- Homepage
- https://milvus.io
README
What is Milvus?
🐦 Milvus is a high-performance vector database built for scale. It powers AI applications by efficiently organizing and searching vast amounts of unstructured data, such as text, images, and multi-modal information.
🧑💻 Written in Go and C++, Milvus implements hardware acceleration for CPU/GPU to achieve best-in-class vector search performance. Thanks to its fully-distributed and K8s-native architecture, Milvus can scale horizontally, handle tens of thousands of search queries on billions of vectors, and keep data fresh with real-time streaming updates. Milvus also supports Standalone mode for single machine deployment. Milvus Lite is a lightweight version good for quickstart in python with pip install.
Want to use Milvus with zero setup? Try out Zilliz Cloud ☁️ for free. Milvus is available as a fully managed service on Zilliz Cloud, with Serverless, Dedicated and BYOC options available.
For questions about how to use Milvus, join the community on Discord to get help. For reporting problems, file bugs and feature requests in GitHub Issues or ask in Discussions.
The Milvus open-source project is under LF AI & Data Foundation, distributed with Apache 2.0 License, with Zilliz as its major contributor.
Quickstart
$ pip install -U pymilvus
This installs pymilvus, the Python SDK for Milvus. Use MilvusClient to create a client:
from pymilvus import MilvusClient
-
You can also try Milvus Lite for quickstart by installing
pymilvus[milvus-lite]. To create a local vector database, simply instantiate a client with a local file name for persisting data:client = MilvusClient("milvus_demo.db") -
You can also specify the credentials to connect to your deployed Milvus server or Zilliz Cloud:
client = MilvusClient( uri="<endpoint_of_self_hosted_milvus_or_zilliz_cloud>", token="<username_and_password_or_zilliz_cloud_api_key>")
With the client, you can create collection:
client.create_collection(
collection_name="demo_collection",
dimension=768, # The vectors we will use in this demo have 768 dimensions
)
Ingest data:
res = client.insert(collection_name="demo_collection", data=data)
Perform vector search:
同一分类的其他项