arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.10944cs.LGcs.DSmath.STstat.MEstat.MLstat.TH
收藏

Express 语言建模

Express Language Modeling

Cornell Tech(康奈尔科技);University of Cambridge(剑桥大学);Microsoft Research(微软研究院)

Albert Gong, Annabelle Michael Carrell, Raaz Dwivedi, Lester Mackey

AI总结:

提出 Express 工具,将非因果注意力近似转换为因果近似,结合 Thinformer 实现最优因果注意力保证,并加速语言建模中的四个资源瓶颈。

摘要:

我们引入了一个新工具 Express,用于将非因果注意力近似转换为具有匹配近似保证的因果近似。当与最先进的 Thinformer 近似结合时,Express 改进了已知的最佳因果注意力保证,对于长度为 $n$ 的序列,实现了 $\log^{3/2}(n)/s$ 的近似误差,仅需 $O(s)$ 内存和 $O(s^2 \log^2(n))$ 的压缩开销。我们将这些进展与高效的 I/O 感知 Triton 实现相结合,展示了相对于 FlashAttention 2 的显著加速,并使用 Express 克服了语言建模流程中的四个资源瓶颈:长上下文预填充、KV 缓存压缩、长形式内存受限解码和长形式计算受限解码。

英文摘要:

We introduce a new tool, Express, for converting a non-causal attention approximation into a causal approximation with matching approximation guarantees. When combined with the state-of-the-art Thinformer approximation, Express improves upon the best known causal attention guarantees, delivering $\log^{3/2}(n)/s$ approximation error with only $O(s)$ memory and $O(s^2 \log^2(n))$ compression overhead for a sequence of length $n$. We pair these developments with an efficient I/O-aware Triton implementation, demonstrate substantial speedups over FlashAttention 2, and use Express to overcome four resource bottlenecks in the language modeling pipeline: long-context prefill, KV cache compression, long-form memory-constrained decoding, and long-form compute-constrained decoding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑