arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.22156cs.CLcs.AIcs.LG
收藏

混合线性注意力的正确实现:用于超长上下文的高效蒸馏和有效架构

Hybrid Linear Attention Done Right: Efficient Distillation and Effective Architectures for Extremely Long Contexts

NLP Group, DCST, IAI, Tsinghua University(清华大学自然语言处理组、数据计算技术研究所、人工智能院);ModelBest Inc., Beijing, China(ModelBest公司)

Yingfa Chen, Zhen Leng Thai, Zihan Zhou, Zhu Zhang, Xingyu Shen, Shuo Wang, Chaojun Xiao, Xu Han, Zhiyuan Liu

AI总结:

本文提出HALO流程和HypeNet架构,通过高效蒸馏将Transformer模型转换为RNN-注意力混合模型,实现超长上下文的高性能与高效率。

摘要:

混合变换器架构,将softmax注意力块与循环神经网络(RNN)相结合,已在长上下文建模中展现出良好的性能-吞吐量折衷,但其采用和研究受到从头大规模预训练的高昂成本的阻碍。一些最近的研究表明,预训练的softmax注意力块可以通过参数转移和知识蒸馏转换为RNN块。然而,这些转移方法需要大量训练数据(超过100亿个标记),并且由此得到的混合模型也表现出较差的长上下文性能,这正是混合模型在Transformer模型上具有显著推理速度提升的场景。在本文中,我们提出了HALO(通过层优化的混合注意力),一种将Transformer模型蒸馏为RNN-注意力混合模型的流程。然后我们提出了HypeNet,一种通过新颖的位置编码方案(称为HyPE)和各种架构修改而具备优越长度泛化能力的混合架构。我们通过HALO将Qwen3系列转换为HypeNet,实现了与原始Transformer模型相当的性能,同时在长上下文性能和效率上更优。转换仅需23亿个标记,不到其预训练数据的0.01%。

英文摘要:

Hybrid Transformer architectures, which combine softmax attention blocks and recurrent neural networks (RNNs), have shown a desirable performance-throughput tradeoff for long-context modeling, but their adoption and studies are hindered by the prohibitive cost of large-scale pre-training from scratch. Some recent studies have shown that pre-trained softmax attention blocks can be converted into RNN blocks through parameter transfer and knowledge distillation. However, these transfer methods require substantial amounts of training data (more than 10B tokens), and the resulting hybrid models also exhibit poor long-context performance, which is the scenario where hybrid models enjoy significant inference speedups over Transformer-based models. In this paper, we present HALO (Hybrid Attention via Layer Optimization), a pipeline for distilling Transformer models into RNN-attention hybrid models. We then present HypeNet, a hybrid architecture with superior length generalization enabled by a novel position encoding scheme (named HyPE) and various architectural modifications. We convert the Qwen3 series into HypeNet using HALO, achieving performance comparable to the original Transformer models while enjoying superior long-context performance and efficiency. The conversion requires just 2.3B tokens, less than 0.01% of their pre-training data

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

↑