paper-with-me

Papers

SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attention

2024-06-17 · Qianchao Zhu, Jiangfei Duan, Chang Chen, Siran Liu, Xiuhong Li, Guanyu Feng, Xin Lv, Huanqi Cao, Xiao Chuanfu, Xingcheng Zhang, Dahua Lin, Chao Yang

Large language models (LLMs) now support extremely long context windows, but the quadratic complexity of vanilla attention results in significantly long Time-to-First-Token (TTFT) latency. Existing approaches to address this complexity require additional pretraining or finetuning, and often sacrifice model accuracy. In this paper, we first provide both theoretical and empirical foundations for near-lossless sparse attention. We find dynamically capturing head-specific sparse patterns at runtime with low overhead is crucial. To address this, we propose SampleAttention, an adaptive structured and near-lossless sparse attention. Leveraging observed significant sparse patterns, SampleAttention attends to a fixed percentage of adjacent tokens to capture local window patterns, and employs a two-stage query-guided key-value filtering approach, which adaptively select a minimum set of key-values with low overhead, to capture column stripe patterns. Comprehensive evaluations show that SampleAttention can seamlessly replace vanilla attention in off-the-shelf LLMs with nearly no accuracy loss, and reduces TTFT by up to $2.42\times$ compared with FlashAttention.

📄 PDF Abstract BibTeX arXiv:2406.15486

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
SET Dynamic Sparse Training method where weight mask is updated randomly periodically

Similar Papers 제목 키워드 기반

LoPT: Lossless Parallel Tokenization Acceleration for Long Context Inference of Large Language Model

2025-11-07 · Wei Shao, Lingchao Zheng, Pengyu Wang, Peizhen Zheng 외 arxiv

Long context inference scenarios have become increasingly important for large language models, yet they introduce significant computational latency. While prior research has optimized long-sequence inference through oper…

LIVEditor-14B: Lightning Unified Video Editing via In-Context Sparse Attention

2026-05-06 · Shitong Shao, Zikai Zhou, Haopeng Li, Yingwei Song 외 arxiv

Video editing has evolved toward In-Context Learning (ICL) paradigms, yet the resulting quadratic attention costs create a critical computational bottleneck. In this work, we propose In-context Sparse Attention (ISA), th…

Deep Lossy Plus Residual Coding for Lossless and Near-lossless Image Compression

2022-09-11 · Yuanchao Bai, Xianming Liu, Kai Wang, Xiangyang Ji 외

Lossless and near-lossless image compression is of paramount importance to professional users in many technical fields, such as medicine, remote sensing, precision engineering and scientific research. But despite rapidly…

Image Compression

Near-Lossless Model Compression Enables Longer Context Inference in DNA Large Language Models

2025-11-18 · Rui Zhu, Xiaopu Zhou, Haixu Tang, Stephen W. Scherer 외 arxiv

Trained on massive cross-species DNA corpora, DNA large language models (LLMs) learn the fundamental "grammar" and evolutionary patterns of genomic sequences. This makes them powerful priors for DNA sequence modeling, pa…

Model Compression

OrderDP: A Theoretically Guaranteed Lossless Dynamic Data Pruning Framework

2026-06-07 · Chenhan Jin, Shengze Xu, Qingsong Wang, Fan Jia 외 arxiv

Data pruning (DP), as an oft-stated strategy to alleviate heavy training burdens, reduces the volume of training samples according to a well-defined pruning method while striving for near-lossless performance. However, e…

Computational Efficiency