PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
June 15, 20241 citationsOpen Access

Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference

View Full Paper
JTJiaming TangYZYilong ZhaoKZKan Zhu

Key Points

Key points are not available for this paper at this time.

Abstract

As the demand for long-context large language models (LLMs) increases, models with context windows of up to 128K or 1M tokens are becoming increasingly prevalent. However, long-context LLM inference is challenging since the inference speed decreases significantly as the sequence length grows. This slowdown is primarily caused by loading a large KV cache during self-attention. Previous works have shown that a small portion of critical tokens will dominate the attention outcomes. However, we observe the criticality of a token highly depends on the query. To this end, we propose Quest, a query-aware KV cache selection algorithm. Quest keeps track of the minimal and maximal Key values in KV cache pages and estimates the criticality of a given page using Query vectors. By only loading the Top-K critical KV cache pages for attention, Quest significantly speeds up self-attention without sacrificing accuracy. We show that Quest can achieve up to 2.23x self-attention speedup, which reduces inference latency by 7.03x while performing well on tasks with long dependencies with negligible accuracy loss. Code is available at http://github.com/mit-han-lab/Quest .

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Tang et al. (2024) studied this question.

synapsesocial.com/papers/68e649f5b6db6435875da7ffhttps://doi.org/10.48550/arxiv.2406.10774
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1Eigen Attention: Attention in Low-Rank Space for KV Cache Compression2024
  2. 2L-Dynamic Attention: Learned Age-Aware KV Cache Management for Efficient Long-Context Transformers2026
  3. 3Scaling Long-Context LLMs via Unified KV Cache Optimization: A Comparative Study of Paged Attention and Quantization2026
  4. 4SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal Budget2024 · 1 citations
  5. 5ThinK: Thinner Key Cache by Query-Driven Pruning2024