Skip to main content

Crate vecq_core

Crate vecq_core 

Source
Expand description

vecq — training-free vector quantization and search at configurable width (4/5/6-bit, default 5-bit).

The “SQLite profile” for vector storage: single file, embedded, deterministic, no training pass. Vectors are rotated with a randomized Hadamard transform (seeded, stored in the file header) so coordinates become approximately N(0,1), then quantized with precomputed Lloyd-Max tables and bit-packed LSB-first. view::VecqView serves the same file format zero-copy from any byte owner (e.g. an mmap).

Re-exports§

pub use store::cosine_f32;
pub use store::PreparedQuery;
pub use store::VecqIndex;
pub use view::VecqView;

Modules§

format
Single-file persistence format.
lloyd
Lloyd-Max optimal scalar quantizer tables for N(0,1), precomputed offline.
rhdh
Randomized Hadamard Transform (RHDH): R = (1/sqrt(d’)) · H · D.
store
Quantized store: nibble-packed 4-bit codes + per-vector norm correction, with asymmetric inner-product scoring (query f32, database 4-bit).
view
Zero-copy read-only index view (VecqView) — issue #25.