yavin质观yavin质观// 2026
← 返回人才与论文主库 全部 53 篇里程碑论文 四层资本与股权穿透
新窗口全屏打开 PDF (16.17 MB) ↗ 下载站内原件 ↓ arXiv 官方页 ↗

[StreamingLLM]Efficient Streaming Language Models with Attention Sinks

arXiv:2309.17453 ICLR 2024 AI编译、量化与推理系统 首次提交日期:2023-09-29 站内 PDF 镜像体积:16.17 MB

Authors: Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, Mike Lewis

本站人才库关联作者:韩松 · 麻省理工学院 →

ARCHITECTURAL BREAKTHROUGH & INDUSTRIAL SIGNIFICANCE // 核心架构突破与产业里程碑意义

揭示自回归大模型初始 Token“注意力汇聚点”(Attention Sinks)物理机制,无需重训练即可在恒定显存 KV Cache 下实现数百万 Token 无限流式推理。

ORIGINAL ARXIV ABSTRACT // 英文原版摘要

Deploying Large Language Models (LLMs) in streaming applications such as multi-round dialogue, where long interactions are expected, is urgently needed but poses two major challenges. Firstly, during the decoding stage, caching previous tokens' Key and Value states (KV) consumes extensive memory. Secondly, popular LLMs cannot generalize to longer texts than the training sequence length. Window attention, where only the most recent KVs are cached, is a natural approach -- but we show that it fails when the text length surpasses the cache size. We observe an interesting phenomenon, namely attention sink, that keeping the KV of initial tokens will largely recover the performance of window attention. In this paper, we first demonstrate that the emergence of attention sink is due to the strong attention scores towards initial tokens as a "sink" even if they are not semantically important. Based on the above analysis, we introduce StreamingLLM, an efficient framework that enables LLMs trained with a finite length attention window to generalize to infinite sequence lengths without any fine-tuning. We show that StreamingLLM can enable Llama-2, MPT, Falcon, and Pythia to perform stable and efficient language modeling with up to 4 million tokens and more. In addition, we discover that adding a placeholder token as a dedicated attention sink during pre-training can further improve streaming deployment. In streaming settings, StreamingLLM outperforms the sliding window recomputation baseline by up to 22.2x speedup. Code and datasets are provided at https://github.com/mit-han-lab/streaming-llm.

HOSTED PDF READER // 阿里云站内高速原件直读

论文原版 PDF 在线阅读(免外网拥堵直出)

移动端/全屏直接打开 PDF ↗
RELATED MILESTONES

同领域(AI编译、量化与推理系统)其他殿堂级代表论文