Skip to main content

Module service

Module service 

Source
Expand description

Stateless Codec service (Phase 15).

Pipeline mirrors tinyquant_cpu.codec.Codec exactly:

  • compress: rotate → quantize → (optional) residual on rotated vs reconstructed
  • decompress: dequantize → (optional) add residual → inverse rotate

Phase 26 adds compress_prepared / decompress_prepared_into which accept a pre-built PreparedCodec so the O(dim²) rotation factorization is paid only once per session rather than on every call.

Structs§

Codec
Zero-sized stateless codec service. Mirrors Python tinyquant_cpu.codec.Codec.

Constants§

GPU_BATCH_THRESHOLD
Minimum batch size below which GPU offload is not attempted.

Traits§

GpuComputeBackend
Trait that every TinyQuant GPU compute backend must satisfy.

Functions§

compress
Module-level compress free function — mirrors tinyquant_cpu.codec.compress.
decompress
Module-level decompress free function — mirrors tinyquant_cpu.codec.decompress.