You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,13 @@ npx ruvector
16
16
17
17
Most vector databases store your data and search it — the same way, every time. RuVector is fundamentally different. It watches how you use it and gets smarter: search results improve automatically, the system tunes itself to your workload, and it runs AI models right on your hardware — no cloud APIs, no per-query bills. It drops into PostgreSQL, runs in browsers, and ships as a single file. Open source. Free forever.
18
18
19
+
```
20
+
User Query → [SONA Engine] → Model Response → User Feedback
`ruvector-attention` provides production-ready implementations of advanced attention mechanisms based on mathematical foundations from differential geometry, information theory, and optimal transport. The library combines theoretical rigor with practical optimizations including SIMD acceleration, caching, and quantization.
8
+
**46 attention mechanisms grounded in 7 mathematical theories -- from Flash Attention to optimal transport -- in one crate.**
13
9
14
-
## Features
10
+
```bash
11
+
cargo add ruvector-attention
12
+
```
15
13
16
-
- 🚀 **High-Performance**: SIMD-accelerated with 4-way unrolled accumulators
17
-
- 🎯 **Ergonomic API**: Fluent builder pattern and preset configurations
18
-
- 📦 **Modular Design**: Mix and match attention mechanisms
19
-
- 🔧 **Flexible**: Support for standard, sparse, graph, and geometric attention
20
-
- 🧠 **7 Mathematical Theories**: Optimal Transport, Mixed Curvature, Topology, Information Geometry, Information Bottleneck, PDE/Diffusion, and Unified Diagnostics
21
-
- 📊 **Unified Reporting**: Health monitoring and automatic attention mode selection
22
-
- 🔢 **Quantization-Friendly**: Component-wise precision control (8-bit Euclidean, 5-bit Hyperbolic/Spherical)
14
+
Attention is the core operation in transformers, vector search, and graph neural networks, but most libraries give you one or two flavors and call it done. `ruvector-attention` ships 46 mechanisms spanning standard dot-product, sparse (Flash, linear, local-global), geometric (hyperbolic, mixed-curvature), graph (GAT, RoPE), and mixture-of-experts -- all SIMD-accelerated with quantization support. Pick the right attention for your data shape instead of forcing everything through softmax(QK^T/sqrt(d))V.
|**Geometric attention**| Hyperbolic, spherical, mixed-curvature | No | No | No |
20
+
|**Graph attention**| Edge-featured GAT, RoPE for graphs | No | No | Limited |
21
+
|**Optimal transport**| Sliced Wasserstein, centroid OT | No | No | No |
22
+
|**Topology-gated**| Coherence-based mode switching | No | No | No |
23
+
|**Quantization**| Per-component (8-bit E, 5-bit H/S) | Via separate tools | No | Limited |
24
+
|**Language**| Rust (with WASM target) | Python/C++ | CUDA only | Python/CUDA |
25
+
|**SIMD acceleration**| Built in (4-way unrolled) | Via backend | CUDA only | Via backend |
26
+
27
+
| Feature | What It Does | Why It Matters |
28
+
|---------|-------------|----------------|
29
+
|**Flash Attention**| O(n) memory tiled computation | Process long sequences without running out of memory |
30
+
|**Mixed Curvature Fusion**| Combines Euclidean, hyperbolic, and spherical spaces in one pass | Model hierarchies, clusters, and flat data simultaneously |
31
+
|**Optimal Transport Attention**| Uses Wasserstein distance instead of dot-product similarity | Better distribution matching for retrieval and generation |
32
+
|**Topology-Gated Switching**| Automatically picks attention mode based on local coherence | Self-adapts to data characteristics without manual tuning |
33
+
|**Information Bottleneck**| Compresses attention via KL minimization | Keeps only the signal, discards noise |
34
+
|**PDE/Diffusion Attention**| Runs heat equation on a similarity graph | Smooth, noise-robust attention for irregular data |
35
+
|**Unified Diagnostics**| Health monitoring and automatic mode selection across all 7 theories | One report tells you which attention works best for your data |
36
+
37
+
> Part of the [RuVector](https://github.com/ruvnet/ruvector) ecosystem -- the self-learning vector database with graph intelligence.
**High-performance Rust vector database engine with HNSW indexing, quantization, and SIMD optimizations.**
8
+
**The pure-Rust vector database engine behind RuVector -- HNSW indexing, quantization, and SIMD acceleration in a single crate.**
9
9
10
-
`ruvector-core` is the foundational Rust library powering [Ruvector](https://github.com/ruvnet/ruvector)—a next-generation vector database built for extreme performance and universal deployment. This crate provides the core vector database engine with state-of-the-art algorithms optimized for modern hardware.
10
+
`ruvector-core` is the foundational library that powers the entire [RuVector](https://github.com/ruvnet/ruvector) ecosystem. It gives you a production-grade vector database you can embed directly into any Rust application: insert vectors, search them in under a millisecond, filter by metadata, and compress storage up to 32x -- all without external services. If you need vector search as a library instead of a server, this is the crate.
11
11
12
-
## 🌟 Why Ruvector Core?
12
+
|| ruvector-core | Typical Vector Database |
13
+
|---|---|---|
14
+
|**Deployment**| Embed as a Rust dependency -- no server, no network calls | Run a separate service, manage connections |
15
+
|**Query latency**| <0.5 ms p50 at 1M vectors with HNSW |~1-5 ms depending on network and index |
16
+
|**Memory compression**| Scalar (4x), Product (8-32x), Binary (32x) quantization built in | Often requires paid tiers or external tools |
17
+
|**SIMD acceleration**| SimSIMD hardware-optimized distance calculations, automatic | Manual tuning or not available |
18
+
|**Search modes**| Dense vectors, sparse BM25, hybrid, MMR diversity, filtered -- all in one API | Typically dense-only; hybrid and filtering are add-ons |
19
+
|**Storage**| Zero-copy mmap with `redb` -- instant loading, no deserialization | Load time scales with dataset size |
20
+
|**Concurrency**| Lock-free indexing with parallel batch processing via Rayon | Varies; many require single-writer locks |
21
+
|**Dependencies**| Minimal -- pure Rust, compiles anywhere `rustc` runs | Often depends on C/C++ libraries (BLAS, LAPACK) |
22
+
|**Cost**| Free forever -- open source (MIT) | Per-vector or per-query pricing on managed tiers |
0 commit comments