跳到正文
arXiv (AI + Vision + Imaging)· Seiya Tokui, Shoichiro Yamaguchi, Sosuke Kobayashi·AI 评分22

语言模型头维度如何影响长上下文检索性能

Head Dimension Matters in Language Models for Long-Context Retrieval

AI 导读

在固定参数预算下,更宽的头(更大head dimension)能提升语言模型的长上下文检索性能,而预训练损失和短上下文非检索任务表现受影响不大。研究发现宽头模型的检索头占比更高,把更多参数分配给检索功能。即使长上下文持续预训练时冻结注意力模块的投影权重,宽头带来的检索提升依然存在,说明其还促进了embedding和MLP等组件的有效适配。

正文 · 原文

arXiv:2610.32213v1 Announce Type: new Abstract: Multi-head attention retrieves and combines context representations through query--key interactions and value aggregation, with head dimension constraining the per-head representation space. In long-context processing, it remains unclear whether allocating a fixed parameter budget to fewer, wider heads improves information retrieval. In this paper, we investigate how head dimension affects the performance of long-context retrieval tasks. Our empirical studies reveal that pretraining loss and short-context non-retrieval task performance are not affected much by head dimension, while long-context retrieval performance improves with wider heads at fixed model sizes. We find that models with wider heads have a higher proportion of retrieval heads, associating more parameters with retrieval. Our ablation studies also show that the retrieval performance improves with wider heads even when the projection weights in attention modules are frozen during long-context continual pretraining, suggesting that wider heads not only benefit updates in attention modules but lead to more effective adaptation of components such as embeddings and MLPs.

来源:arXiv (AI + Vision + Imaging) · arxiv.org