1pub mod codebook;
10pub mod mse;
11pub mod pack;
12pub mod prod;
13pub mod qjl;
14pub mod rotation;
15pub mod store;
16
17pub use codebook::Codebook;
18pub use mse::{QuantizedVector, TurboQuantMse};
19pub use prod::{QuantizedProdVector, TurboQuantProd};
20pub use qjl::QjlTransform;
21pub use rotation::Rotation;
22pub use store::CompressedEmbeddingStore;
23
24#[derive(Debug, thiserror::Error)]
26pub enum QuantError {
27 #[error("unsupported bit-width: {0} (must be 1-4)")]
28 UnsupportedBitWidth(u8),
29
30 #[error("dimension mismatch: expected {expected}, got {got}")]
31 DimensionMismatch { expected: usize, got: usize },
32
33 #[error("format error: {0}")]
34 Format(String),
35
36 #[error("I/O error: {0}")]
37 Io(#[from] std::io::Error),
38}