混合线性与Softmax注意力,显著降低长文本推理开销。
Every Attention Matters: An Efficient Hybrid Architecture for Long-Context Reasoning
- 采用线性与Softmax注意力混合架构,减少长序列计算负担。
- 1040亿参数模型推理成本仅为320亿参数密集模型的1/10。
- 自研FP8算子库提升训练效率50%,适合复杂推理任务研究者。
本文提出Ring-linear模型系列,包括160亿参数的Ring-mini-linear-2.0(9.57亿激活)和1040亿参数的Ring-flash-linear-2.0(61亿激活)。该系列采用混合架构,融合线性注意力与Softmax注意力,在长上下文推理中显著降低输入输出与计算开销。相比320亿参数稠密模型,推理成本降至1/10;相较于原Ring系列,成本也降低超50%。通过系统探索混合架构中不同注意力机制的比例,确定了当前最优结构。同时,借助自研高性能FP8算子库linghe,训练效率提升50%。得益于训练与推理算子的高度对齐,模型在强化学习阶段可实现长期稳定高效优化,在多个复杂推理基准上持续保持顶尖性能。
原文摘要 · Abstract (English)
In this technical report, we present the Ring-linear model series, specifically including Ring-mini-linear-2.0 and Ring-flash-linear-2.0. Ring-mini-linear-2.0 comprises 16B parameters and 957M activations, while Ring-flash-linear-2.0 contains 104B parameters and 6.1B activations. Both models adopt a hybrid architecture that effectively integrates linear attention and softmax attention, significantly reducing I/O and computational overhead in long-context inference scenarios. Compared to a 32 billion parameter dense model, this series reduces inference cost to 1/10, and compared to the original Ring series, the cost is also reduced by over 50%. Furthermore, through systematic exploration of the ratio between different attention mechanisms in the hybrid architecture, we have identified the currently optimal model structure. Additionally, by leveraging our self-developed high-performance FP8 operator library-linghe, overall training efficiency has been improved by 50%. Benefiting from the high alignment between the training and inference engine operators, the models can undergo long-term, stable, and highly efficient optimization during the reinforcement learning phase, consistently maintaining SOTA performance across multiple challenging complex reasoning benchmarks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。