Search papers, labs, and topics across Lattice.
DASH-KV accelerates long-context LLM inference by reformulating attention as approximate nearest-neighbor search using asymmetric deep hashing. They design an asymmetric encoding architecture that differentially maps queries and keys based on their precision and reuse characteristics, and introduce a dynamic mixed-precision mechanism to retain full-precision computation for critical tokens. Experiments on LongBench show DASH-KV matches full attention performance while reducing inference complexity from O(N^2) to O(N), outperforming existing KV cache compression methods.
Attention's quadratic complexity is no longer a bottleneck: DASH-KV achieves linear O(N) inference without sacrificing accuracy by reformulating attention as an approximate nearest-neighbor search.
The quadratic computational complexity of the standard attention mechanism constitutes a fundamental bottleneck for large language models in long-context inference. While existing KV cache compression methods alleviate memory pressure, they often sacrifice generation quality and fail to address the high overhead of floating-point arithmetic. This paper introduces DASH-KV, an innovative acceleration framework that reformulates attention as approximate nearest-neighbor search via asymmetric deep hashing. Under this paradigm, we design an asymmetric encoding architecture that differentially maps queries and keys to account for their distinctions in precision and reuse characteristics. To balance efficiency and accuracy, we further introduce a dynamic mixed-precision mechanism that adaptively retains full-precision computation for critical tokens. Extensive experiments on LongBench demonstrate that DASH-KV significantly outperforms state-of-the-art baseline methods while matching the performance of full attention, all while reducing inference complexity from O(N^2) to linear O(N). The code is available at https://github.com/Zhihan-Zh/DASH-KV