Papers
arxiv:2609.17652

Fathom: Per-Query Read Depth for Sparse Decoding over Offloaded KV Caches

Published on Sep 15
· Submitted by
Vivek Kalyanarangan
on Sep 17

Abstract

When agentic sessions run to a million tokens with many sessions resident at once, the KV cache and the index that ranks it live in host memory, and the scan that ranks all n keys for a top-k step becomes the traffic that bounds decoding. We present Fathom, a key scan in which each query decides how many bits of each key channel to read. The 4-bit K cache is stored channel-major as bit planes, so a prefix of t planes is exactly the channel's t-bit quantizer, and the query spends its bit budget by reverse water-filling over the variance-weighted importance of its channels. At one million tokens on Qwen3-8B a decode step is 1.67x faster in GPU time than with the 136-bit scans of Double Sparsity, Loki and SparQ r=32, and in the same GPU time as SparQ's 68-bit read (r=16) Fathom reads 18% fewer bytes with lower attention error on six of seven model and context settings. On RULER-style tasks every per-token scan matches exact top-k decoding, and on real coding-agent sessions Fathom reaches the step agreement of the most accurate 136-bit scan at 92 bits. The store is the 4-bit K copy a quantized serving stack already holds, and the method is not faster when the index is resident in GPU memory.

Community

Paper author Paper submitter

Long agent sessions push the KV cache out of GPU memory and into host RAM. Once that happens, the thing a decode step waits on is not the model weights or the selected KV rows. It is the index scan that ranks all n keys to pick the top-k, and that scan grows with context while the fetch of the winners does not. For Qwen3-8B the 136-bit-per-token index that Double Sparsity, Loki and SparQ read is 5.1 GB per step at one million tokens against about 200 MB of winner rows.

Fathom lets each query decide how many bits of each key channel to read. Store the 4-bit K cache channel-major as bit planes and the first t planes of a channel are exactly its t-bit quantizer, so a prefix read is exact and contiguous. Each query then spends a bit budget by reverse water-filling over its channel importances, which has a closed form and runs as one Triton kernel.

Measured on an A100 at one million tokens with the cache and index in host memory: a decode step is 1.67x faster in GPU time than the 136-bit scans. Fathom reaches Double Sparsity's attention error at 46 to 74 bits per token on seven model and context settings up to 128k, and on real OpenHands coding-agent sessions it matches the most accurate 136-bit scan at 92 bits.

Two things it does not do. With the index resident in GPU memory it is not faster, because the scan is arithmetic-bound there and reading fewer bits does not remove multiply-adds. And the calibration domain barely matters, which was worth testing and worth reporting.

Code, every result file and the run chains are public, and each table and figure in the paper regenerates from those files.

Sign up or log in to comment

Get this paper in your agent:

hf papers read 2609.17652
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 0

No model linking this paper

Cite arxiv.org/abs/2609.17652 in a model README.md to link it from this page.

Datasets citing this paper 0

No dataset linking this paper

Cite arxiv.org/abs/2609.17652 in a dataset README.md to link it from this page.

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2609.17652 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.