Skip to content
Book Open access

HVKV: Scalable Long-Context Inference through Hypervector KV Cache Retrieval

2027 · Proceedings of the 32nd ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1 · 0 citations · 14 references

Abstract

Long-context inference is increasingly bottlenecked by the KV cache rather than the model weights. CPU offloading can extend capacity, but transferring the full KV cache at each decode step turns memory pressure into a bandwidth bottleneck. We present HVKV, a KV-cache retrieval framework based on compact yet effective binary key representations. HVKV keeps these compact binary keys on the GPU for Hamming-distance indexing and offloads the full-precision KV cache to CPU memory, fetching only the selected KV pairs to compute attention over the retrieved top-k subset. This design confines approximation to candidate selection, reducing the cost and memory footprint of index-based retrieval, while preserving full-precision attention. To make this efficient in practice, HVKV combines an incremental Hamming-distance update that reuses distance state across adjacent decode steps with a dual GPU cache for retrieved KV pairs. HVKV matches Full Attention at a 1% token budget while outperforming the strongest compared baseline at similar budgets by 35.0% in average score, and reduces per-token decode latency by up to 32.8% at 1M context.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.