Pith. sign in

REVIEW 1 cited by

HashEvict: A Pre-Attention KV Cache Eviction Strategy using Locality-Sensitive Hashing

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2412.16187 v3 pith:AQII5WNN submitted 2024-12-13 cs.LG cs.AIcs.CLcs.DScs.PF

HashEvict: A Pre-Attention KV Cache Eviction Strategy using Locality-Sensitive Hashing

classification cs.LG cs.AIcs.CLcs.DScs.PF
keywords cachehashevicttokencurrentattentioncompressembeddingshashing
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
Share X Bluesky LinkedIn Reddit HN
read the original abstract

Transformer-based large language models (LLMs) use the key-value (KV) cache to significantly accelerate inference by storing the key and value embeddings of past tokens. However, this cache consumes significant GPU memory. In this work, we introduce HashEvict, an algorithm that uses locality-sensitive hashing (LSH) to compress the KV cache. HashEvict quickly locates tokens in the cache that are cosine dissimilar to the current query token. This is achieved by computing the Hamming distance between binarized Gaussian projections of the current token query and cached token keys, with a projection length much smaller than the embedding dimension. We maintain a lightweight binary structure in GPU memory to facilitate these calculations. Unlike existing compression strategies that compute attention to determine token retention, HashEvict makes these decisions pre-attention, thereby reducing computational costs. Additionally, HashEvict is dynamic - at every decoding step, the key and value of the current token replace the embeddings of a token expected to produce the lowest attention score. We demonstrate that HashEvict can compress the KV cache by 30%-70% while maintaining high performance across reasoning, multiple-choice, long-context retrieval and summarization tasks.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. SpotAttention: Plug-In Block-Sparse Routing for Pretrained Long-Context Transformers

    cs.LG 2026-06 conditional novelty 6.0

    SpotAttention is a plug-in selector trained by KL distillation to route sparse attention in long-context transformers, matching dense accuracy up to 128K tokens with 3.9x decode speedup.