# Transformer-FSQ: Discrete Latents for Extreme KV-Cache Compression

Transformer-FSQ stores each token's cache as a small packed integer code

Andras Szecsenyi, Thomas L. Lee, Vaisakh Shaj, Elliot J. Crowley, Amos Storkey · arXiv · 2026-11-6

- **Problem** The key-value cache grows with context length and can outgrow the model weights on a local device. Existing compression methods fail beyond moderate compression ratios.
- **Method** Transformer-FSQ stores one packed integer code per token instead of separate keys and values.
- **Results** On RULER long-context retrieval, Transformer-FSQ is the most accurate method evaluated, from 12× to 97.5× compression. At 97.5× it decodes at 1.54× the throughput of native SDPA attention on the uncompressed Qwen3-8B-Base.

![Figure 2: RULER at8,192tokens against achieved compressionon Qwen3-0.6B, 1.7B and 8B. Solid: finetuned; dashed: training-free; grey horizontal line: uncompress…](https://refivu.com/papers/2bf6bae4-9cf0-4410-be66-f6384a0a3929/figures/figure-143568dc1b87e4274a7ef40cbbd23ae4.png?thumb=512)

**Figure 2** :RULER at8,192tokens against achieved compressionon Qwen3-0.6B, 1.7B and 8B. Solid: finetuned; dashed: training-free; grey horizontal line: uncompressed. Points average up to three seeds (one on 8B), with 95% bootstrap intervals over seeds and then items stratified by task. Beyond about12×, Transformer-FSQ scores highest on all three models.

[Original paper](https://arxiv.org/abs/2611.09598v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Andras Szecsenyi, Thomas L. Lee, Vaisakh Shaj, Elliot J. Crowley, Amos Storkey · Transformer-FSQ: Discrete Latents for Extreme KV-Cache Compression · Original paper figure · Extracted the figure area from page 2 of the original PDF.

## Why the KV cache limits local models

The KV cache becomes the bottleneck because it stores keys and values for every token, so it grows with context while the weights stay fixed. On a local machine, the cache competes directly with the model weights for one fixed memory budget. Reaching 1.39M retained entries requires 256× compression, which Figure 1 shows as a jump in magnitude.

Local use matters for privacy, because prompts stay on the user's device instead of passing through central intermediaries. The authors note that releasing weights alone does not achieve this kind of local processing.

Compression is the natural response, but it usually trades accuracy for context. Existing methods shrink the cache along four axes: token eviction, scalar quantisation, low-rank projection and latent attention, and vector quantisation.

## Replacing keys and values with one code

Transformer-FSQ stores one packed integer code per token instead of separate keys and values. An FSQ encoder maps each token's residual state to a G-dimensional latent, and rounding turns that latent into integers. The encoder is a learned linear map, and the quantiser rounds every coordinate to one of L fixed levels. A single decoder then rebuilds the keys and values for all KV heads from that one stored code.

Standard attention instead keeps a separate key and value vector for every head. The authors compress the shared residual state rather than each projection, because post-hoc KV quantisation compresses several projections of the same state.

Vector quantisation needs a learned codebook, so it requires commitment losses, updates and nearest-neighbour search. A learned codebook can also suffer centroid collapse, where entries become inactive. Finite scalar quantisation avoids this because each coordinate is rounded onto fixed scalar levels. The discrete grid is implicit, so the authors never store or search a codebook.

With 16 levels, each coordinate takes 4 bits, and the cache stores nothing beside the packed code.

The method is applied to a pretrained transformer, so it does not pretrain the model from scratch. Because FSQ can scale to this width without searching the large Cartesian code space, the authors treat the code as a wide product representation rather than a categorical token. At equal storage, 16-level coordinates allow four times as many coordinates as an FP16 latent.

## Encoding, decoding and conversion of Transformer-FSQ

The encoder is a learned linear map from the C-dimensional residual state to a G-dimensional latent, which is rounded coordinate-wise to L levels. Transformer-FSQ applies the FSQ quantiser Q\_FSQ to each coordinate of E x\_t, so the token's residual state becomes one integer code z\_t. The rounding uses a straight-through estimator in the backward pass, so the forward pass returns the rounded value while gradients pass as if rounding were absent.

All main-text experiments use L = 16, which is four bits per coordinate, and the packed code takes ⌈Gb/8⌉ bytes per token per layer. The cache stores nothing beside this packed code, so it carries no per-token quantisation metadata.

One decoder W\_kv splits into W\_k and W\_v and reconstructs all KV heads from the same cached code. Keys are rebuilt at each decoding step as RoPE\_t applied after the key normalisation of W\_k z\_t. Positional rotation lies between the key decoder and the query-key dot product, so the decoder can't be folded into the query. Values need one decode only, because attention first pools the codes into a weighted sum and W\_v is applied once.

Keys are rebuilt at every cached position, which is the main arithmetic overhead of Transformer-FSQ.

Conversion is closed form and uses the pretrained model's own activations on a small calibration set. The calibration sample holds m = 32,768 ClimbMix tokens of residual states. The encoder rows are principal directions of the centred calibration states, scaled by their standard deviations, and cycle through the C directions when G exceeds C.

The converted model already approximates the original key and value computation before any finetuning.

## RULER results against baselines

At 5× and below, VecInfer keeps at least 93% of uncompressed RULER scores on every model, which is 93%, 97% and 96%. So training-free methods are strongest at moderate ratios, and the FSQ bottleneck only pulls ahead once compression gets deeper.

The same pattern appears on natural documents, so synthetic retrieval gains carry over to LongBench gov\_report summarisation. On Qwen3-8B-Base, the uncompressed ROUGE-L is 16.9, and baselines track it at moderate compression before collapsing at higher ratios.

The authors next ask whether learning a low-bit grid matters at a fixed budget, which is the question of Table 2.

## Discrete grid versus continuous latents at one byte budget

The authors compare bottlenecks at matched byte budgets to test whether the discrete grid itself drives the gain. Continuous latents must be four times narrower to fit the budget, because each coordinate costs more bytes.

![Table 2: Discreteness at matched byte budgets:RULER at8,192tokens on Qwen3-0.6B-Base (three seeds,0.25tokens per parameter) at nominal144and80B per token per l…](https://refivu.com/papers/2bf6bae4-9cf0-4410-be66-f6384a0a3929/figures/figure-f8c8b4c9a97d4fb51332bb90484ad30f.png?thumb=512)

**Table 2** :Discreteness at matched byte budgets:RULER at8,192tokens on Qwen3-0.6B-Base (three seeds,0.25tokens per parameter) at nominal144and80B per token per layer; mean±95% bootstrap half-width. The uncompressed model (4,096B) scores0.718±0.023. Continuous latents are4×narrower to fit the budget; post-hoc variants quantise a wide continuous latent at evaluation. KIVI’s per-block scales add36and20B; TransMLA spends32B on rotary keys. Training through the 4-bit grid (STE,L=16) scores highest at both budgets.

[Original paper](https://arxiv.org/abs/2611.09598v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## Decode throughput: what the cache savings cost in speed

Speed is measured on NVIDIA L40S GPUs as full-model decode throughput relative to native SDPA decoding on the uncompressed model. The benchmark applies no sampling, so the timing reflects only the forward computation.

## Stacking with eviction and a 4-bit backbone

Token eviction and Transformer-FSQ act on different axes, so their savings can add up at inference. PyramidKV keeps fewer tokens, while Transformer-FSQ makes each stored token cheaper in bytes. On Qwen3-0.6B-Base with a RULER threshold of 0.30, the stacked pair reaches 3.8M tokens across concurrent sequences on a 16 GiB GPU. That capacity is 1.7× the furthest baseline, the head-shared PyramidKV, with a 95% interval of 1.0 to 2.3.

The authors note that peak prefill memory caps this projected capacity.

The authors test whether Transformer-FSQ still works on a weight-quantised backbone, using Qwen3-8B-Base.

## Limits of the evidence

The evidence stops well short of the wide-grid regime, because the paper deploys 16 levels across latent widths from 16 to 4,096. Mentzer et al. (2024) recommend at least 5 levels for dimensions up to 6, so the wide settings run far beyond that validated range. That design gives up multidimensional cell shaping, and the paper doesn't measure what this costs.

Fewer coordinates with finer levels remain untested at moderate compression, where existing methods stay stronger. Every configuration except FSQ-small uses these 16 levels, and FSQ-small appears only in the LongBench tables. Transformer-FSQ's advantage therefore rests on the high-compression end of the curve, which the paper does test.

Prior work reports sharper degradation on those tasks than on retrieval-style tasks, so the RULER scores don't transfer to them.

A high score on these retrieval tasks doesn't show that Transformer-FSQ keeps multi-step reasoning intact under compression. The authors leave that question for future measurement.

## Paper info

- **Authors**: Andras Szecsenyi, Thomas L. Lee, Vaisakh Shaj, Elliot J. Crowley, Amos Storkey
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-6
- **Added**: 2026-11-9
- **Updated**: 2026-11-6
- **Version**: v1
- **arXiv**: 2611.09598
- **Category**: cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.09598v1) · [PDF ↗](https://arxiv.org/pdf/2611.09598v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Private, personalised language models must run on local consumer devices, where large, frontier models cannot fit, and retaining long contexts is non-trivial. Sequential memory---the key-value (KV) cache---grows linearly with context length, quickly dwarfing the model itself: for Qwen3-1.7B-Base, 200,000 retained entries require 21 GiB, 6.6 times more than the model weights. Yet the KV-cache compression methods we measured fail beyond moderate compression ratios. We introduce Transformer-FSQ, addressing extreme KV-cache compression by replacing standard key and value projections with a finite scalar quantisation bottleneck. Our cache stores a packed vector of discrete integer codes per token, with no per-token quantisation metadata. Converting a pretrained transformer trains only these projections on 0.25 tokens per original parameter. We evaluate Transformer-FSQ against five baseline families on models from 0.6B to 8B parameters. On long-context retrieval (RULER), from 12$\\times$ to 97.5$\\times$ Transformer-FSQ is the most accurate method we evaluate, across scales. A fused Triton kernel decodes directly from the integer codes; with baselines given their authors' kernels where available, it decodes at $1.01\\times$ (95% interval $0.98$--$1.05$) the throughput of native SDPA attention on the uncompressed Qwen3-8B-Base at $32\\times$ and $1.54\\times$ at $97.5\\times$. Extreme KV-cache compression is therefore a practical way to extend how much context a fixed device can hold.

## Quote from the paper

Andras Szecsenyi, Thomas L. Lee, Vaisakh Shaj, Elliot J. Crowley, Amos Storkey (2026). Transformer-FSQ: Discrete Latents for Extreme KV-Cache Compression. arXiv:2611.09598v1. https://arxiv.org/abs/2611.09598v1

**BibTeX**

```
@misc{szecsenyi2026transformer,
  title = {{Transformer-FSQ: Discrete Latents for Extreme KV-Cache Compression}},
  author = {Andras Szecsenyi and Thomas L. Lee and Vaisakh Shaj and Elliot J. Crowley and Amos Storkey},
  year = {2026},
  eprint = {2611.09598},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09598v1}
}
```

## Other paper commentary

- [Two-Stream Convolutional Networks for Action Recognition in Videos](https://refivu.com/en/papers/d621dee0-0b2a-45a8-b152-6260b98f0db4-two-stream-convolutional-networks-for-action-recognition-in.md)
- [Glow: Generative Flow with Invertible 1x1 Convolutions](https://refivu.com/en/papers/fb9c5b80-a221-4385-8910-2ae4413b604b-glow-generative-flow-with-invertible-1x1-convolutions.md)
- [Density estimation using Real NVP](https://refivu.com/en/papers/6e98cc2c-51ae-4105-a052-60a312be9b3d-density-estimation-using-real-nvp.md)
- [Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks](https://refivu.com/en/papers/f9c68dd2-7de8-40fa-9eb6-ea62d8856b71-model-agnostic-meta-learning-for-fast-adaptation-of.md)
- [PredRNN: A Recurrent Neural Network for Spatiotemporal Predictive Learning](https://refivu.com/en/papers/c0da3abd-5c1e-4383-ae59-22d04fe3eb7d-predrnn-a-recurrent-neural-network-for-spatiotemporal.md)
- [Weakly-Supervised Convolutional Neural Networks for Multimodal Image Registration](https://refivu.com/en/papers/bfc7dfd6-1596-4541-9723-c26ab0c5a3f5-weakly-supervised-convolutional-neural-networks-for.md)
- [FOSCAR: Accelerating Decode Attention over 2- and 4-Bit KV Caches through Affine Folding](https://refivu.com/en/papers/25f2b187-e0d8-4c67-863e-a4af04718667-foscar-accelerating-decode-attention-over-2-and-4.md)
- [Contextual Search and Bilateral Trade with a Trace-Square-Root Potential](https://refivu.com/en/papers/be7285e2-7269-4708-81ac-c858b20806f4-contextual-search-and-bilateral-trade-with-a-trace.md)
- [Health-System-Wide Mapping of Demographic Information in Routine Clinical Histopathology](https://refivu.com/en/papers/188d9a0e-7a3e-49cd-9ce6-a2fbf9f7ab80-health-system-wide-mapping-of-demographic-information-in.md)
- [Same Facts, Different Remedy: Linguistic Profiling and Arbitrariness in LLM and System One Decisions](https://refivu.com/en/papers/651c228a-1123-4d3e-8f9b-c2f2f7e83e1c-same-facts-different-remedy-linguistic-profiling-and.md)
- [Copies Are Not Confirmations: How News Duplication Fools LLM Judges and Continual Learners](https://refivu.com/en/papers/bcffc290-845f-46ad-bea6-1c8ea00e2371-copies-are-not-confirmations-how-news-duplication-fools.md)
- [A Tight Hierarchy for Chain of Thought](https://refivu.com/en/papers/30c4303e-5574-4b31-a888-d622bd7ab74d-a-tight-hierarchy-for-chain-of-thought.md)

## Terms in this paper

- [KV cache](https://refivu.com/en/terms/cbf2f6d2bcc1-kv-cache)
- [RoPE](https://refivu.com/en/terms/e4cc5cfc6ebf-rope)
- [straight-through estimator](https://refivu.com/en/terms/daa90b015f59-straight-through-estimator)
- [KV-cache](https://refivu.com/en/terms/54ba3757ae07-kv-cache)
- [vector quantisation](https://refivu.com/en/terms/e8b48f380a45-vector-quantisation)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/2bf6bae4-9cf0-4410-be66-f6384a0a3929-transformer-fsq-discrete-latents-for-extreme-kv-cache)
