qjl_sketch/lib.rs
1//! QJL sketch — fast approximate attention scoring via sign-based vector compression.
2//!
3//! Compresses key/value vectors using random projection sign hashing (QJL) and
4//! min-max scalar quantization, then stores them in append-only mmap-backed stores.
5//! Scoring is approximate inner product via packed sign bits; batched store-level
6//! scoring can be GPU-accelerated with the `gpu` feature.
7//!
8//! # Feature flags
9//!
10//! - `serde` — enables `Serialize`/`Deserialize` on all public structs and
11//! streaming store export/import.
12//! - `gpu` — enables WGPU GPU-accelerated `KeyStore::scores` (batched float × sign).
13
14pub mod codebook;
15pub mod error;
16#[cfg(feature = "gpu")]
17pub mod gpu;
18pub mod math;
19pub mod mse_quant;
20pub mod outliers;
21pub mod quantize;
22pub mod quantizer;
23pub mod rotation;
24pub mod score;
25pub mod sketch;
26pub mod store;
27pub mod values;