低秩注意力残差 Low-Rank Attention Residuals 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-06-19
👁️ 预览文献
💡 AI 中文简介
大语言模型中的注意力残差(AttnRes)用深度注意力替代固定残差求和,但每个输出同时作为全维度的键和值,导致路由计算成本随隐藏宽度增长。本文提出低秩注意力残差(LR-AttnRes),保留全维度残差值,但仅用r维(r<d)的键进行路由,具体取每个值的最后r维作为路由键。在10亿和40亿参数模型上,当r=d/4时,LR-AttnRes比标准AttnRes获得更低的验证损失、更高的下游准确率和更高的训练吞吐量。作者还提供了融合内核,并开源了代码、内核和所有训练模型。
领域自然语言处理 / 大语言模型架构与优化
适合谁读需要一定深度学习和大语言模型背景的读者
核心贡献1. 提出LR-AttnRes,用低维键进行深度路由,显著降低残差侧计算量,同时保持全维值表示;2. 在1B和4B模型上验证了低秩路由的有效性,并提供了融合内核和开源模型。
关键数据在1B和4B参数模型上,r=d/4时,LR-AttnRes比标准AttnRes最终验证损失更低、下游平均准确率更高、训练步吞吐量更高。
推荐理由如果你关注大模型训练效率与性能的平衡,这篇工作用简单的低秩技巧实现了双赢,且代码模型全开源,值得一读。
关键词["大语言模型", "注意力残差", "低秩路由", "深度注意力", "训练效率", "模型架构"]

原文摘要

查看英文原文摘要

Attention Residuals (AttnRes) replace the fixed residual sum with depth-wise attention over previous sub-layer outputs in Large Language Models (LLMs), but use each output as both a full-dimensional key and value. This couples routing with representation and makes the cost of computing depth-routing scores scale with hidden width $d$. We propose Low-Rank Attention Residuals (LR-AttnRes), which keep full-dimensional residual values while using $r$-dimensional keys, with $r < d$, for routing. LR-AttnRes uses the last $r$ dimensions of each value as the routing key, reducing total residual-side FLOPs while still improving performance. Comprehensive sweeps across the number of blocks ($N$) and $r$ show that depth-wise routing can be effective with far fewer dimensions than the model width. At both $1$B and $4$B parameters with $r = d/4$, LR-AttnRes achieves lower final validation loss, higher average downstream accuracy, and higher measured training-step throughput than standard AttnRes. We also provide a fused kernel supporting standard and low-rank routing. We release all code, the kernel, and all trained models to facilitate future research.