arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.18246cs.CL
收藏

变宽Transformer

Variable-Width Transformers

MIT(麻省理工学院);MIT-IBM Watson AI Lab(MIT-IBM沃森人工智能实验室)

Zhaofeng Wu, Oliver Sieberling, Shawn Tan, Rameswar Panda, Yury Polyanskiy, Yoon Kim

AI总结:

提出一种中间窄、两端宽的变宽Transformer架构,通过无参数残差缩放机制实现非均匀容量分配,在语言模型困惑度、FLOPs和KV缓存上优于均匀宽度基线。

摘要:

扩展模型规模,特别是深度和宽度,推动了基于Transformer的语言模型的显著进步。然而,大多数架构在所有层中保持恒定宽度,即使不同层可能扮演不同的计算角色,也均匀分配固定的参数和计算预算。在这项工作中,我们通过提出一个×形> <former架构,实证研究了跨网络深度的非均匀容量分配。该设计保持较宽的早期和晚期层,同时缩窄中间层,利用无参数残差缩放机制。在从200M到2B参数(密集)和3B参数(MoE)的仅解码器语言模型中,我们的> <former在语言建模损失上始终优于参数匹配的均匀基线。通过降低平均层宽度,该架构还减少了总体FLOPs(在拟合的损失匹配缩放曲线下减少22%)以及更小的KV缓存内存和I/O成本(减少15%)。在分析中,我们展示了这种瓶颈结构导致残差流中定性不同的表示。总体而言,我们的结果表明,非均匀宽度分配可以导致语言模型更资源最优的缩放。

英文摘要:

Scaling model size, specifically depth and width, has driven significant progress in transformer-based language models. However, most architectures maintain a constant width across all layers, allocating a fixed parameter and computation budget evenly despite different layers potentially playing distinct computational roles. In this work, we empirically investigate nonuniform capacity allocation across network depth by proposing a $\times$-shaped > <former architecture. This design maintains wider early and late layers while narrowing the middle layers, utilizing a parameter-free residual resizing mechanism. Across decoder-only language models ranging from 200M to 2B parameters (dense) and 3B parameters (MoE), our > <former consistently outperforms parameter-matched uniform baselines on language modeling loss. By reducing the average layer width, this architecture also requires fewer overall FLOPs (22% reduction under fitted loss-matched scaling curves) and smaller KV cache memory and I/O cost (15% reduction). In analysis, we show that this bottleneck structure results in qualitatively different representations in residual streams. Overall, our results demonstrate that nonuniform width allocation can result in more resource-optimal scaling of language models.

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

↑