ChatPaper.aiChatPaper

OCTOPUS: geoptimaliseerde KV-cache voor Transformers via octaëdrische parametrisatie onder optimale kwadratische foutkwantisatie

OCTOPUS: Optimized KV Cache for Transformers via Octahedral Parametrization Under optimal Squared error quantization

May 20, 2026
Auteurs: Mark Boss, Vikram Voleti, Simon Donné, Shimon Vainer
cs.AI

Samenvatting

De key-value (KV) cache domineert de geheugenbandbreedte en -voetafdruk bij autoregressieve inferentie met lange context. Recente rotatie-gepreconditioneerde codecs (TurboQuant, PolarQuant) tonen aan dat een gestructureerde willekeurige rotatie gevolgd door een scalaire kwantisator per coördinaat, afgestemd op een analytisch hanteerbare marginale verdeling, een bijna-optimaal recept is voor KV-compressie. OCTOPUS breidt dit paradigma uit met gezamenlijke kwantisatie van geroteerde coördinaat-tripleten. De richting van elk triplet wordt via een octaëdrische parameterisatie afgebeeld op een vierkant, en de twee resulterende coördinaten en de triplet-norm worden Lloyd-Max gekwantiseerd tegen implementatie-afgestemde marginale verdelingen. Optimalisatie van de kwadratische fout per triplet leidt tot een strikt niet-uniforme bitallocatie die alleen afhangt van de totale dimensionaliteit van de keys. We vinden dat het eindig-dimensionale kwaliteitsoptimum, verkregen via sweeps, constant is op elke echte decoder die we testen. De codec is data-onafhankelijk, online en deterministisch gegeven een seed. Over tekst, video en audio presteert OCTOPUS gelijk aan of beter dan elke eerdere rotatiecodec bij elke gerapporteerde bitsbreedte en metriek, met een voorsprong die groeit naarmate bits dalen voor extreme compressie. Bovendien reconstrueert een gefuseerde Triton-implementatie keys on the fly zonder de ongecomprimeerde key te materialiseren, waardoor de codec geen decodeer-bandbreedte of -latentie toevoegt bovenop de bestaande dekwantisatie. Projectpagina: https://octopus-quant.github.io/
English
The key-value (KV) cache dominates memory bandwidth and footprint in long-context autoregressive inference. Recent rotation-preconditioned codecs (TurboQuant, PolarQuant) show that a structured random rotation followed by a per-coordinate scalar quantizer matched to an analytically tractable marginal is a near-optimal recipe for KV compression. OCTOPUS advances this paradigm through joint quantization of rotated coordinate triplets. Each triplet's direction is mapped to a square via an octahedral parameterization, and the two resulting coordinates and the triplet norm are Lloyd-Max quantized against implementation-matched marginals. Optimizing the per-triplet squared error gives a strictly non-uniform bit allocation depending only on the total dimensionality of the keys. We find the finite-dimensional quality optimum with sweeps to be constant on every real decoder we test. The codec is data-oblivious, online, and deterministic given a seed. Across text, video, and audio, OCTOPUS matches or beats every prior rotation codec at every reported bit width and metric, with a lead that grows as bits drop for extreme compression. Furthermore, a fused Triton implementation reconstructs keys on the fly without materializing the uncompressed key, so the codec adds no decode-time bandwidth or latency over the existing dequantization. Project Page: https://octopus-quant.github.io/