Fieldnote-Echo / ordvec
PublicTraining-free ordinal & sign quantization for compressed nearest-neighbour retrieval over high-dimensional embeddings. Pure Rust, zero system dependencies.
ordvec is a training-free library for compressed nearest-neighbor search over high-dimensional embeddings. It compresses vectors based on the rank order of their coordinates (rather than learning patterns from data) and supports fast similarity search with adjustable precision. The library provides four index types: Rank for full-precision ranking, RankQuant for compressed bucketed ranks, Bitmap for fast candidate filtering, and SignBitmap for sign-based retrieval. It includes SIMD acceleration for x86_64, ARM, and WebAssembly targets, and ships with Python bindings for easy integration.
How It Works
You've built an AI application that creates vector representations of documents, images, or text — and now you need to find similar items quickly.
You install ordvec as a dependency in your project. It works right away with no extra setup or training required.
You add your collection of embeddings to the index. The library compresses each one based on the ranking order of its values.
Without any training or fitting, your vectors are compressed and ready to search. The library knows exactly how much space each one takes.
You enter a query vector and ask for the top 10 most similar items from your collection.
Search directly through your compressed vectors for the best matches
Quickly filter candidates with a bitmap, then rerank the best ones with full precision
The library returns the most similar items ranked by relevance, using the ordinal structure of your vectors.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.