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

*Mark Boss, Vikram Voleti, Simon Donné, Shimon Vainer*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152912) · [OpenReview](https://openreview.net/forum?id=PTfy7K7w8o) · [alphaXiv](https://www.alphaxiv.org/abs/2605.21226) · [Open on the map](../papers.html#p152912)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Low-Precision LLM Inference](../pgroup/142.md) · Type: new method · Keywords: KV cache compression, rotation-preconditioned quantization, octahedral parametrization, Lloyd-Max quantization, transformer inference efficiency

## Summary
OCTOPUS is a new KV cache codec that jointly quantizes rotated coordinate triplets using octahedral parametrization to achieve optimal squared-error compression, outperforming prior rotation codecs across text, video, and audio.

## Explained to a 5-year-old
Big computer programs that write stories, make videos, or talk to us need to remember a lot of information while they write. This memory is called the key-value cache, and it takes up a lot of space. The researchers found a new trick to pack that memory more tightly, like using a special box to hold three numbers together. Their trick works for all kinds of information-words, pictures, and sounds-and makes the program use less memory without slowing it down. This helps the programs run faster and use less electricity, so they can do more.

## Explained to a 5-year-old, longer
Imagine a giant robot that writes long stories, watches videos, or talks to people, and it needs to remember everything it has seen so far. That memory is stored in something called a key-value cache, which can become very big and take up a lot of space. The researchers looked at how this cache is stored and noticed that they could group three numbers together and put them into a special shape called an octahedron. By using this shape, they can compress the numbers more efficiently, so the robot needs less memory. This new method works for any type of data, whether it’s words in a text, frames in a video, or sounds in an audio clip. It also keeps the robot’s speed the same because the new compression can be done quickly and does not need extra time to read the data back. The result is that the robot can remember more without using as much memory, which saves energy and lets it run longer on the same hardware. This makes the robot’s tasks smoother and more affordable for everyone.

## For a technical reader
The paper presents a data-oblivious, online codec that rotates KV vectors and quantizes triplets of coordinates using an octahedral mapping, followed by Lloyd-Max quantization of the derived coordinates and norms. This joint quantization yields a non-uniform bit allocation that depends only on the total dimensionality, improving compression efficiency over prior per-coordinate methods. The codec is implemented in Triton and reconstructs keys on the fly, adding no extra decode-time bandwidth or latency. Evaluations across text, video, and audio show consistent gains over existing rotation codecs, especially at low bit rates.

## Problem
Key-value caches in long-context autoregressive inference consume large memory bandwidth and footprint, requiring efficient compression methods that preserve accuracy while reducing storage and compute.

## Method
The approach rotates KV vectors, groups them into coordinate triplets, maps each triplet’s direction to a square via an octahedral parameterization, and then quantizes the resulting two coordinates and the triplet norm using Lloyd-Max quantizers matched to implementation-specific marginals. Per-triplet squared-error optimization yields a non-uniform bit allocation that depends only on the total dimensionality of the keys, and the codec is data-oblivious, online, and deterministic given a seed.

## Results
The approach matches or exceeds prior codecs across text, video, and audio at all bit rates, with its advantage growing at very low bits, while adding no extra decode-time bandwidth or latency.

## Contributions
It introduces joint quantization of rotated coordinate triplets with an octahedral parameterization and Lloyd-Max quantizers, yielding an optimal, data-oblivious, online codec that allocates bits non-uniformly based on dimensionality. The work also provides a Triton implementation that reconstructs keys on the fly, eliminating decode-time overhead.

## Practical relevance
It enables efficient long-context inference on existing hardware without extra memory bandwidth or latency, making large-scale transformer models more practical.

## Research questions this paper is counted under

- [How can we compress or evict key-value cache entries to reduce memory usage without degrading LLM performance?](../q/21.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152912)
