OCTOPUS shrinks an AI model's memory cache to 2 bits, authors say
In short
- Four researchers at Stability AI describe OCTOPUS, a way to shrink the KV cache, the working memory a transformer model fills as it reads or generates a long sequence. It is a preprint posted on arXiv on 20 May 2026 and not yet peer reviewed; the company put it on its research page on 3 June 2026.
- The headline: when every cached number is squeezed to 2 bits, a 7-billion-parameter language model using OCTOPUS still found the right hidden fact in 0.81 of long-context tests, the authors report. With two earlier codecs, PolarQuant and TurboQuant-QJL, it fell to 0.04 and 0.01.
- The authors tested it on text, video and audio models and say it matches or beats earlier rotation-based codecs, with a lead that grows as the bit budget shrinks. Their own tables show two small exceptions, set out below.
- It is a method, not a model: there are no weights to download. The project page still listed the code as "Soon" when we read it on 30 November 2026.
0.81 long-context recall at 2 bits, vs 0.04 and 0.01; +34.7% rise in perplexity at 2 bits, vs +63% to +772%; 2.9× smaller cache at 2 bits in the language test; 8.9–11.3× slower attention step than uncompressed, language model on one H200
What problem it attacks
A transformer model works through a sequence one piece (one token) at a time. For every token it has already seen, each attention layer keeps two lists of numbers, a key and a value, so it does not have to recompute them. That store is the KV cache. It grows with the input, and the paper says reading it at every step "dominates" the cost of long-context generation, in video and audio models as well as text.
The usual fix is quantization: store each number with fewer bits. Models normally keep the cache at 16 bits per number. The bit width is how many bits each number gets after compression; at 2 bits, each number can take only one of four values. Fewer bits mean a smaller cache and less to read, but also a coarser copy of what the model stored, and at some point the model starts to fail.
How does OCTOPUS shrink the memory cache?
The authors build on a family of rotation codecs, including TurboQuant and PolarQuant. These first scramble each key with a fixed random rotation, which spreads its information evenly so that every coordinate follows a known statistical shape, and then round each coordinate on its own to the best set of levels for that shape (a Lloyd-Max quantizer).
OCTOPUS changes the rounding step:
- After the same rotation, it cuts each key into groups of three numbers (triplets).
- Each triplet is split into its length and its direction. The direction is a point on a sphere.
- An octahedral map, a trick from computer graphics, folds that sphere onto a flat square, so the direction becomes two numbers between -1 and 1.
- The length and the two square coordinates are each rounded to their own best set of levels.
The paper works out how to share the bits: the direction coordinates get one bit more than the nominal budget and the length one bit less. On synthetic test data this split cut the error by 31–41% compared with giving every number the same bits, the authors report.
The method needs no calibration on a model's own data. Its codebooks depend only on the size of the keys and the bit budget, so the same codec can be dropped into any model with attention.
The results
The team compared OCTOPUS with three codecs, TurboQuant-MSE, TurboQuant-QJL and PolarQuant, using the same rotation and the same handling of the values, so only the key codec changed. All the numbers below are the authors' own.
Language. On Qwen2.5-7B-Instruct-1M, an open model with a context of one million tokens, they measured perplexity (how surprised the model is by real text; lower is better) on the WikiText-2 benchmark at a context of 4,096 tokens. The table gives the rise over the uncompressed cache and how much smaller the cache became.
In a "needle in a haystack" test, a hidden fact had to be recalled from contexts of 4,000 to 128,000 tokens. At 4 bits every codec scored a perfect 1.00. At 3 bits OCTOPUS still scored 1.00 and PolarQuant fell to 0.86. At 2 bits OCTOPUS averaged 0.81 while PolarQuant and TurboQuant-QJL scored 0.04 and 0.01. TurboQuant-MSE kept some recall at 2 bits; by our average of the paper's Table 8 it scored 0.64.
Video. On two video generators built on the Wan-1.3B model (CausVid and Causal Forcing), every codec ran the same 100 prompts from identical starting noise. At 2 bits on Causal Forcing, TurboQuant-QJL's output was "effectively random noise", the authors write. OCTOPUS's frames were degraded but coherent: their average LPIPS was 0.58, where 0 means identical to the uncompressed video, and the worst prompt scored 0.82.
Audio. On the AAR audio model at 2 bits, the three earlier codecs rose to 12.6–13.2 dB of spectral distortion with negative signal-to-noise ratios. OCTOPUS stayed at 6.75 dB and +1.07 dB.
The claim of matching or beating earlier codecs "at every reported bit width and metric" has exceptions in the paper itself: at 4 bits on video, PolarQuant is within 3% (its average LPIPS is slightly better than OCTOPUS's on both video models: 0.037 against 0.038 on CausVid, 0.301 against 0.309 on Causal Forcing), and on audio at 3 bits PolarQuant is "slightly better" on average distortion and signal-to-noise (Table 3 also shows TurboQuant-MSE's mean signal-to-noise slightly higher there, 1.6 against 1.5 dB).
The costs
Three conditions sit behind the headline numbers:
- Real savings are smaller than the bit width suggests. Going from 16 bits to 2 would be eight times smaller on paper. In the language test the cache shrank 2.9×, because some tokens and layers stay uncompressed and the codec stores extra data alongside the bits. At the same bit width OCTOPUS saves slightly less memory than TurboQuant-MSE (2.9× against 3.0× there).
- On the language model, some layers must stay uncompressed. On Qwen, keys in the first and last transformer blocks were kept at full precision. Without that, the authors write, every rotation codec, theirs included, breaks down (perplexity above 1,000).
- It is slower per step. The abstract says the fused Triton kernel, which rebuilds keys on the fly inside attention, adds no bandwidth or latency over existing dequantization. Measured against an uncompressed cache on one NVIDIA H200 GPU, the attention step took 8.9 to 11.3 times longer for the language model, and the language-model kernel was also slower than TurboQuant-MSE's (0.66 against 0.37 milliseconds at 4 bits). The paper says the codec is "most attractive when KV bandwidth or capacity is the bottleneck".
Terms in plain English
Where things stand
OCTOPUS is a single preprint, version 1, with all comparisons run by its authors: Mark Boss, Vikram Voleti, Simon Donné and Shimon Vainer of Stability AI. The project page has side-by-side video and audio samples at 4, 3 and 2 bits, and lists the code as coming "Soon". We found no independent test.
Official channels of Stability AI: Website · LinkedIn · X · YouTube
Sources
- OCTOPUS: Optimized KV Cache for Transformers via Octahedral Parametrization Under Optimal Squared Error Quantization, Boss, Voleti, Donné and Vainer, arXiv preprint 2605.21226v1, 20 May 2026
- OCTOPUS, Stability AI research page, 3 June 2026
- OCTOPUS project page, read 30 November 2026
Sources
- OCTOPUS: Optimized KV Cache for Transformers via Octahedral Parametrization Under Optimal Squared Error Quantization
- OCTOPUS
- OCTOPUS project page
Related stories
- Bobtail squid brain neurons are born in 'fountains' by the eyes
- MiniMax releases M4, a 2.74T-parameter model; weights to follow
- Subquadratic says its SubQ Savant AI takes up to 4 million tokens
- Stability AI opens weights for three of four new audio models
- ggml-org opens a dashboard tracking llama.cpp speed on AMD GPUs
- Aleph Alpha explains how Kolibri 1.1 reads long inputs faster
More from AI in Europe
- H Company releases Holo3.1 computer-use models for local use
- Stability AI releases Stable Audio 3.0 music models, three open
- Barcelona Supercomputing Center adds speech to Salamandra model
- LongBlocks pairs questions with long documents in 31 languages
- Tilde's open TildeOpen model now reads eight times more text