Skip to main content

Module codec

Module codec 

Source
Expand description

Codec layer: deterministic CodecConfig, canonical rotation matrix, rotation cache, codebook quantization, residual helpers, and the stateless Codec service.

Phase 13 introduced the rotation primitives; Phase 14 adds the uniform-quantile Codebook plus scalar quantize / dequantize kernels. Phase 15 adds the Codec service, FP16 residual helpers, CompressedVector value object, and Parallelism enum.

Re-exports§

pub use codebook::Codebook;
pub use codec_config::CodecConfig;
pub use codec_config::SUPPORTED_BIT_WIDTHS;
pub use compressed_vector::CompressedVector;
pub use parallelism::Parallelism;
pub use rotation_cache::RotationCache;
pub use rotation_cache::DEFAULT_CAPACITY as ROTATION_CACHE_DEFAULT_CAPACITY;
pub use rotation_matrix::RotationMatrix;
pub use service::compress;
pub use service::decompress;
pub use service::Codec;

Modules§

codebook
Immutable quantization lookup table with Python-parity training.
codec_config
CodecConfig: immutable value object describing codec parameters.
compressed_vector
In-memory CompressedVector value object (Phase 15).
gaussian
Deterministic ChaCha20-backed standard-normal f64 stream.
parallelism
Parallelism dispatch for batch codec methods (Phase 15).
residual
FP16 residual helpers (Phase 15).
rotation_cache
Process-wide LRU cache for rotation matrices, keyed by (seed, dim).
rotation_matrix
Canonical orthogonal rotation matrix (ChaCha → faer QR → sign correction).
service
Stateless Codec service (Phase 15).