Semafold
A vector compression toolkit for AI workloads that uses TurboQuant codecs to shrink embeddings and KV-cache tensors roughly tenfold, with typed encode and decode contracts and measured byte accounting.
Semafold compresses embeddings, retrieval representations, and cache-shaped key/value tensors for AI infrastructure, aiming to give teams measurable storage reduction without losing visibility into distortion, artifact size, or integration boundaries. Its core is a pure NumPy implementation that needs no GPU, with optional automatic acceleration on NVIDIA CUDA or Apple Metal through PyTorch or MLX when they are installed.
Reported benchmarks show about a 10.5x size reduction for a float32 embedding workload and roughly 9.5x for a float32 KV tensor workload using its TurboQuant-based codecs, with every result accompanied by typed encode and decode contracts, explicit guarantees, and deterministic synthetic validation. The architecture separates a stable root contract, a codec layer with concrete compression implementations such as the TurboQuant family, and a validation layer that keeps storage, distortion, and behavior checks measurable.
It targets embedding stores, vector databases and retrieval pipelines, long-term vector memory in AI orchestrators, and KV-tensor compression in custom inference engines.