paper-with-me

Papers

CoSA: Accelerating Long-Context Inference via Proxy-Kernel Co-Designed Sparse Attention

2026-07-28 · Yufei Xue, Lin Niu, Hong Liu, Siran Liu, Hanyong Shao, Wei Liu, Guanghua Yu, Jianchen Zhu, Jun Zhang arxiv

The quadratic cost of self-attention makes long-context inference prohibitively expensive, and proxy-based block-sparse attention has become a practical remedy. Existing methods typically rely on a proxy to predict a binary sparse mask and a kernel to consume this mask and perform sparse attention computation. Such an approach is effective under moderate budgets. However, as the budget tightens, the estimated proxy inevitably drops some salient blocks, while the kernel can only apply the sparse mask mechanically, leading to an evident drop in model accuracy. We propose CoSA, a two-stage training-free Sparse Attention under proxy-kernel CO-design, which couples a Kernel-Aware Proxy (KAP) with an Ordered-Skipping Kernel (OSK). In the first stage, the KAP selects blocks under a moderate budget and produces an ordered mask that prescribes the order in which KV pages are visited in the kernel inner loop. In the second stage, the OSK applies this mask and skips more blocks under a tightened budget given online-softmax statistics. Across mainstream LLM backbones and long-context benchmarks, CoSA attains higher accuracy at lower budgets. Impressively, CoSA achieves a 4.93$\times$ attention speedup and reduces end-to-end Time-to-First-Token by 2.53$\times$ under a context length of 128K with negligible performance degradation.

📄 PDF Abstract BibTeX arXiv:2607.25291

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

ProxyKV: Cross-Model Proxy Pruning for Efficient Long-Context LLM Inference

2026-05-09 · Junjie Li, Jiong Lou, Jie Li arxiv

Efficient long-context inference in Large Language Models (LLMs) is severely constrained by the Key-Value (KV) cache memory wall, yet existing pruning methods force a choice between low-latency heuristics that sacrifice …

Controllable Safety Alignment: Inference-Time Adaptation to Diverse Safety Requirements

2024-10-11 · Jingyu Zhang, Ahmed Elgohary, Ahmed Magooda, Daniel Khashabi 외

The current paradigm for safety alignment of large language models (LLMs) follows a one-size-fits-all approach: the model refuses to interact with any content deemed unsafe by the model provider. This approach lacks flex…

Safety Alignment

ReCoSa: Detecting the Relevant Contexts with Self-Attention for Multi-turn Dialogue Generation

2019-07-09 · ACL 2019 7 · Hainan Zhang, Yanyan Lan, Liang Pang, Jiafeng Guo 외

In multi-turn dialogue generation, response is usually related with only a few contexts. Therefore, an ideal model should be able to detect these relevant contexts and produce a suitable response accordingly. However, th…

Dialogue GenerationResponse Generation

Contextual Salience for Fast and Accurate Sentence Vectors

2018-03-22 · Eric Zelikman, Richard Socher

Unsupervised vector representations of sentences or documents are a major building block for many language tasks such as sentiment classification. However, current methods are uninterpretable and slow or require large tr…

Document SummarizationGeneral ClassificationSentenceSentence Embeddings+2

COSA: Concatenated Sample Pretrained Vision-Language Foundation Model

2023-06-15 · Sihan Chen, Xingjian He, Handong Li, Xiaojie Jin 외

Due to the limited scale and quality of video-text training corpus, most vision-language foundation models employ image-text datasets for pretraining and primarily focus on modeling visually semantic representations whil…

FormmodelQuestion AnsweringRetrieval+6