Research & Papers

MonaVec’s Vector Search Doesn’t Need Training — And That’s Just the Start

Training-free, 4-bit quantization beats FAISS while fitting in 27 MB

Deep Dive

MonaVec is a deterministic, embedded vector-search kernel designed for edge and offline AI environments where servers, network connectivity, and training data are unavailable. Unlike traditional systems like FAISS that assume persistent servers and gigabytes of RAM, MonaVec operates like SQLite: one file, one function call, runs anywhere. Its training-free quantization core uses a Randomized Hadamard Transform (RHDH) to condition any input distribution toward N(0,1), enabling precomputed Lloyd-Max tables to quantize vectors to 4 bits (8x smaller) without any learned codebook or data pass. The index is stored as a single .mvec file with an embedded ChaCha20 rotation seed, guaranteeing deterministic results across architectures and byte-identical output within a build—a property parallel-build graph libraries cannot offer.

On benchmarks using semantic embeddings (AG News, 45K x 1024-dim BGE-M3, cosine similarity), MonaVec's 4-bit BruteForce mode reaches 0.960 Recall@10 in just 27 MB, leading both float32 FAISS-IVF and 8-bit usearch on recall while trading peak throughput for byte-identical determinism. For magnitude-sensitive L2 data, a single-pass global standardization extends the same data-oblivious pipeline. Optional IvfFlat and HNSW backends scale to million-vector corpora. The kernel is implemented in pure Rust with Python bindings and runtime SIMD dispatch (AVX-512, AVX2, NEON, scalar). MonaVec targets on-device RAG, offline agents, and embedded retrieval—the niche SQLite occupies for relational data: one file, one call, runs anywhere.

Key Points
  • Training-free 4-bit quantization via Randomized Hadamard Transform achieves 8x compression without data passes
  • Deterministic ChaCha20 seed ensures byte-identical results across different architectures and builds
  • 0.960 Recall@10 on AG News with 27 MB index, outperforming float32 FAISS-IVF and 8-bit usearch

Why It Matters

Enables reliable vector search on devices with no server or connectivity, powering offline RAG and autonomous agents.

📬 Get the top 10 AI stories daily