$ show infiniflow/infinity
Infinity is a high-performance AI-native vector database designed for LLM applications, offering hybrid search over dense embeddings, sparse embeddings, tensors, and full-text. Its architecture is a distributed C++ core with a modular planner/executor, multiple index types (HNSW, IVF, BMP, DiskANN, EMVB, PLAID, full-text), and a transaction system with WAL and checkpointing. The database exposes a SQL interface, a Thrift RPC API, an HTTP API, and native SDKs for Python, Go, and C++. It also includes a web GUI (Next.js) for administration. The codebase is heavily optimized with SIMD instructions, custom analyzers for multiple languages, and advanced query optimization (fast rough filters, result caching). While the repository is actively maintained with a comprehensive test suite and CI/CD pipeline, there is some technical drift from deprecated KNN implementations and disabled unit tests, and the reliance on C++20 modules may introduce compiler compatibility risks.
The LLM identified 3 files worth highlighting for reuse:
A standalone, reusable implementation of a finite state transducer (FST) library, binary compatible with the original BurntSushi/fst. It supports exact key lookup, automata queries (regex, Levenshtein), and streaming I/O. This module has minimal internal dependencies and can be extracted into any project requiring efficient ordered maps or sets with compressed representation.
Provides portable SIMD abstraction with runtime CPU feature detection (SSE2, AVX2, AVX512, F16C) and utility functions for alignment, prefetch, and vectorized operations. The module is self-contained and can be reused in any C++ project that needs runtime SIMD dispatch without external dependencies.
A thread-safe connection pool for the Infinity Thrift client, implementing acquire/release patterns with timeout and max connections. This is a clean, self-contained utility that can be adapted for any Thrift or gRPC-based client to manage concurrent connections.