Reproduce “TurboQuant: Online Vector Quantization with Near-optimal Distortion Rate” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Amir Zandieh, Majid Daliri, Majid Hadian, Vahab Mirrokni
TurboQuant compresses key and value caches for long-context language models by randomly rotating vectors and quantizing coordinates; a residual one-bit QJL sketch can correct inner-product bias. For unit-norm inputs, its quantizers approach information-theoretic distortion lower bounds, with a stated maximum factor of about 2.7. In a Llama-3.1-8B-Instruct needle-in-a-haystack test, recall is 0.997, matching full precision.
Key insights
- Applying random rotations to vectors on the unit sphere can transform arbitrary input distributions into a uniform distribution where coordinates become nearly independent and follow a predictable Beta distribution in high dimensions.
- This near-independence of coordinates simplifies the complex high-dimensional vector quantization problem into a series of independent optimal scalar quantization tasks.
- Unbiased inner product estimation requires a specialized approach, addressed by combining an MSE-optimized quantizer with a 1-bit QJL transform on the quantization residual.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.