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

GatedV:用于Transformer语言模型的自门控值

GatedV: Self-Gated Values for Transformer Language Models

Li-Ming Yu, Hongyu Zhou

AI总结:

提出仅对Transformer注意力的值应用SiLU的无额外参数变体GatedV,在两种参数规模下均降低保留困惑度,仅带来约0.7%的延迟提升,验证了其性能增益。

摘要:

标准注意力机制通过对输入隐藏状态进行学习到的线性投影,形成查询(Q)、键(K)和值(V)矩阵。GAU和Mega等架构将非线性变换融入注意力机制中。本文提出GatedV,一种简单的注意力变体,仅在聚合前对V应用SiLU,且不引入额外可训练参数。我们在参数数量匹配、初始化配对、训练token预算相同的条件下,将GatedV与标准仅解码器Transformer进行对比评估。在233万参数规模下,GatedV使平均保留困惑度从59.1降至57.9(降幅2.0%),且在全部5组配对随机种子上均有提升。在2616万参数规模下,经等预算学习率搜索后,平均保留困惑度从20.2降至19.7(降幅2.4%),且在全部3组配对随机种子上均有提升。小模型消融实验表明,所测试的值仿射缩放无法完全复现GatedV的增益。在NVIDIA DGX Spark上进行的短交替基准测试显示,基于同步挂钟计时,较大模型的全上下文前向延迟约高0.7%。这些发现表明,仅值的自门控可在不增加参数数量或重新设计注意力权重机制的情况下,提升语言建模性能。

英文摘要:

Standard attention forms query (Q), key (K), and value (V) matrices through learned linear projections of input hidden states. Architectures such as GAU and Mega incorporate nonlinear transformations into attention. In this paper, we propose GatedV, a simple attention variant that applies SiLU only to V before aggregation without introducing additional trainable parameters. We evaluate GatedV against a standard decoder-only Transformer using matched parameter counts, paired initializations, and equal training-token budgets. At 2.33M parameters, GatedV reduces mean held-out perplexity from 59.1 to 57.9 (2.0%), with improvements across all five paired seeds. At 26.16M parameters, following an equal-budget learning-rate search, mean held-out perplexity falls from 20.2 to 19.7 (2.4%), with improvements across all three paired seeds. Small-model ablations show that the tested affine rescaling of values does not fully reproduce GatedV's gains. A short interleaved benchmark on NVIDIA DGX Spark measures approximately 0.7% higher full-context forward latency for the larger model, based on synchronized wall-clock timings. These findings suggest that value-only self-gating can improve language modeling performance without increasing parameter count or redesigning the attention-weighting mechanism.

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

↑