arXiv:2510.21450cs.LG2025-10被引 14

让非线性RNN实现并行训练,突破大模型扩展瓶颈

ParaRNN: Unlocking Parallel Training of Nonlinear RNNs for Large Language Models

  • 将非线性RNN的序列计算转化为可并行求解的方程组,用牛顿迭代加速
  • 70亿参数的LSTM/GRU模型训练速度提升665倍,性能媲美Transformer
  • 开源框架支持快速构建大规模非线性RNN,适合追求高效序列建模的研究者

循环神经网络(RNN)奠定了序列建模的基础,但其固有的顺序特性限制了并行计算,成为规模化发展的根本障碍。这导致了Transformer等可并行架构的主导地位,以及近期状态空间模型(SSMs)的兴起。尽管SSMs通过结构化线性递归实现高效并行,但线性约束限制了其表达能力,难以建模复杂的非线性序列依赖。为此,我们提出ParaRNN框架,打破非线性RNN的序列-并行化壁垒。基于前期工作,我们将非线性递推关系序列视为一个整体方程系统,利用牛顿迭代与定制并行规约实现并行求解。实现上,相较于朴素串行计算,最高可提速665倍,使非线性RNN在前所未有的规模下得以训练。为验证效果,我们对LSTM和GRU架构进行适配,成功训练出70亿参数模型,困惑度(perplexity)达到与同等规模Transformer及Mamba2相当的水平。为推动高效序列建模研究,我们开源ParaRNN代码库,提供非线性RNN自动训练并行化的通用框架,助力研究人员和实践者大规模探索新型非线性RNN模型。

原文摘要 · Abstract (English)

Recurrent Neural Networks (RNNs) laid the foundation for sequence modeling, but their intrinsic sequential nature restricts parallel computation, creating a fundamental barrier to scaling. This has led to the dominance of parallelizable architectures like Transformers and, more recently, State Space Models (SSMs). While SSMs achieve efficient parallelization through structured linear recurrences, this linearity constraint limits their expressive power and precludes modeling complex, nonlinear sequence-wise dependencies. To address this, we present ParaRNN, a framework that breaks the sequence-parallelization barrier for nonlinear RNNs. Building on prior work, we cast the sequence of nonlinear recurrence relationships as a single system of equations, which we solve in parallel using Newton's iterations combined with custom parallel reductions. Our implementation achieves speedups of up to 665x over naive sequential application, allowing training nonlinear RNNs at unprecedented scales. To showcase this, we apply ParaRNN to adaptations of LSTM and GRU architectures, successfully training models of 7B parameters that attain perplexity comparable to similarly-sized Transformers and Mamba2 architectures. To accelerate research in efficient sequence modeling, we release the ParaRNN codebase as an open-source framework for automatic training-parallelization of nonlinear RNNs, enabling researchers and practitioners to explore new nonlinear RNN models at scale.

RNN并行训练大模型序列建模

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