arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.28769cs.LG
收藏

多混合器模型:基于共享表示的灵活序列建模

Multi-Mixer Models: Flexible Sequence Modeling with Shared Representations

Carnegie Mellon University(卡内基梅隆大学);Google Research(谷歌研究)

Kevin Y. Li, Asher Trockman, Ananda Theertha Suresh, Ziteng Sun

AI总结:

提出Oryx混合模型,通过序列轴上的灵活切换(注意力与线性递归)实现高效长上下文处理,在1.4B规模下平均语言建模任务提升0.7个百分点。

摘要:

Softmax注意力是现代大型语言模型的基石,但其内存随序列长度线性增长,计算量呈二次增长。线性递归模型(如线性注意力和状态空间模型)因其线性计算和恒定内存而成为注意力的替代方案。尽管这些次二次令牌混合方法(或混合器)在广泛基准上取得了有前景的效率提升和竞争性结果,但当前的线性递归模型在需要长上下文检索或上下文学习的任务上仍落后。越来越多的研究致力于通过静态交错或合并注意力与递归块来缓解这些权衡的混合架构。在这项工作中,我们探索了开发混合模型的新轴:跨令牌序列。我们提出Oryx,一种混合模型,可以在序列中灵活切换不同的混合器,例如用于丰富上下文利用的二次注意力和用于高效生成的线性递归。Oryx在混合器之间绑定至少90%的参数,使注意力和递归模式能够在共享内部表示上操作。我们使用Mamba-2和Gated DeltaNet变体验证了我们的设计,模型规模达1.4B。在固定令牌预算和混合训练策略下,Oryx实现了与其单一混合器基线相当或更好的性能。在1.4B规模下,所有Oryx实例在平均语言建模任务上至少比各自基线高出0.7个百分点。在检索任务上,即使仅以注意力模式处理极小部分(<10%)的令牌,Oryx也能达到与Transformer基线相当的性能。这些结果表明注意力和线性递归模型可以共享内部表示,并激励序列轴混合化作为一个有前景的方向。

英文摘要:

Softmax attention is the cornerstone of modern large language models, but its memory scales linearly and compute quadratically with sequence length. Linear recurrent models, such as linear attention and state space models, have become widely studied as alternatives to attention due to their linear compute and constant memory. While these sub-quadratic token mixing methods, or mixers, achieve promising efficiency gains and competitive results on a wide range of benchmarks, current linear recurrent models still lag behind on tasks that require long-context retrieval or in-context learning. A growing body of work studies hybrid architectures that attempt to mitigate these trade-offs by statically interleaving or merging attention and recurrent blocks. In this work, we explore a new axis of developing hybrid models: across the token sequence. We propose Oryx, a hybrid model that can, throughout a sequence, flexibly switch between different mixers, for example quadratic attention for rich context utilization and linear recurrences for efficient generation. Oryx ties at least 90% of its parameters across mixers, enabling attention and recurrent modes to operate over shared internal representations. We validate our design with Mamba-2 and Gated DeltaNet variants, up to 1.4B models. Under fixed token budgets and a mixed-training strategy, Oryx achieves comparable or better performance than its single-mixer baselines. At the 1.4B scale, all instances of Oryx outperform their respective baselines by at least 0.7 percentage points on averaged language modeling tasks. On retrieval tasks, Oryx achieves performance comparable to the Transformer baseline even when processing only a tiny fraction (<10%) of the tokens in attention mode. These results suggest that attention and linear recurrent models can share internal representations, and motivate sequence-axis hybridization as a promising direction.

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

↑