Skip to main content

Crate vecq_core

Crate vecq_core 

Source
Expand description

vecq — training-free 4-bit vector quantization and search.

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 4-bit tables and nibble-packed two dimensions per byte.

Re-exports§

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

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).