Oryx 解决了长上下文检索与高效生成的矛盾,做序列建模或大模型架构的开发者可以直接参考其共享参数设计思路,值得关注。
Oryx 是一种新型混合架构,能在序列处理中灵活切换注意力(用于长上下文检索)和线性循环(用于高效生成),解决了传统模型在效率和长上下文能力之间的权衡。该模型在 1.4B 参数规模下,平均语言建模任务性能比单一混合器基线提升至少 0.7 个百分点。在检索任务中,即使仅用不到 10% 的 token 运行注意力模式,Oryx 也能达到与 Transformer 基线相当的性能。Oryx 的关键创新是让不同混合器共享至少 90% 的参数,从而在共享内部表示上高效切换。这项工作表明注意力与线性循环模型可以共享表示,为序列轴上的混合设计提供了新方向。
Multi-Mixer Models: Flexible Sequence Modeling with Shared Representations
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.