arXiv:2507.19353cs.CLcs.AI2025-07被引 4

提出分块阅读方法,让循环型大模型在长文本任务上追平注意力模型性能。

Smooth Reading: Bridging the Gap of Recurrent LLM to Self-Attention LLM on Long-Context Tasks

  • 借鉴人类阅读策略,分块处理上下文并迭代摘要信息。
  • 使循环模型在LongBench上性能超越注意力模型3.61个百分点。
  • 保持高效优势:训练快3倍,64k上下文推理快2倍。

近期,具有线性计算复杂度的循环大语言模型(Recurrent LLMs)作为自注意力模型(Self-Attention LLMs)的高效替代方案重新兴起,后者具有二次复杂度。然而,由于固定大小的内存限制,循环模型在长上下文任务中表现不佳。以往研究主要通过架构创新提升其记忆容量,但仍未使其在长上下文任务上达到自注意力模型的性能。本文认为,一次性处理全部上下文不适用于循环模型。为此,我们提出Smooth Reading——一种受人类阅读启发的分块推理方法。该方法将上下文分块处理并迭代总结信息,降低内存需求,更适配循环模型。实验表明,该方法显著缩小了两类模型在长上下文任务上的差距。使用SWA-3B-4k(循环模型)在LongBench上性能从低于自注意力模型5.68%提升至高于3.61%。同时,该方法保持高效率:在64k上下文下,训练速度加快3倍,推理速度加快2倍。据我们所知,这是首个在长上下文任务中实现循环模型与自注意力模型相当性能的工作。我们将公开代码与数据集以推动后续研究。

原文摘要 · Abstract (English)

Recently, recurrent large language models (Recurrent LLMs) with linear computational complexity have re-emerged as efficient alternatives to self-attention-based LLMs (Self-Attention LLMs), which have quadratic complexity. However, Recurrent LLMs often underperform on long-context tasks due to their limited fixed-size memory. Previous research has primarily focused on enhancing the memory capacity of Recurrent LLMs through architectural innovations, but these approaches have not yet enabled Recurrent LLMs to match the performance of Self-Attention LLMs on long-context tasks. We argue that this limitation arises because processing the entire context at once is not well-suited for Recurrent LLMs. In this paper, we propose Smooth Reading, a chunk-wise inference method inspired by human reading strategies. Smooth Reading processes context in chunks and iteratively summarizes the contextual information, thereby reducing memory demands and making the approach more compatible with Recurrent LLMs. Our experimental results show that this method substantially narrows the performance gap between Recurrent and Self-Attention LLMs on long-context tasks, while preserving the efficiency advantages of Recurrent LLMs. Our Smooth Reading boosts SWA-3B-4k (a Recurrent LLM) from 5.68% lower to 3.61% higher performance than Self-Attention LLMs on LongBench. Besides, our method maintains the high efficiency, training 3x faster and inferring 2x faster at 64k context compared to Self-Attention LLMs. To our knowledge, this is the first work to achieve comparable performance using Recurrent LLMs compared with Self-Attention LLMs on long-context tasks. We hope our method will inspire future research in this area. To facilitate further progress, we will release code and dataset.

循环模型长文本高效推理分块处理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。