按年被提到
20222023 · 3 次2026
大模型与语言模型›模型表达力与计算理论·arXiv:2212.10554 · cs.CL

A Length-Extrapolatable Transformer

长度可外推的 Transformer
Yutao Sun, Li Dong, Barun Patra, Shuming Ma, Shaohan Huang, Alon Benhaim, Vishrav Chaudhary, Xia Song, Furu Wei · 2022

提出 xPos 位置编码,让 Transformer 能在训练长度之外外推

开始阅读 ↗PDFalphaXiv 讨论
被推荐 · 4 人首次 2023-03-01 · 最近 2024-10-08发表于 Proceedings of the conference - Association for Computational Linguistics. Meeting
4不同的人
3活跃月份
4讨论串
59被引(OpenAlex)

聚焦长度外推,即在短文本上训练、在更长序列上评估。论文定义“注意力分辨率”作为外推能力的指标,并提出两点设计:显式最大化注意力分辨率的相对位置编码,以及推理时使用的分块因果注意力。语言建模实验显示该模型在内插和外推设置下都表现良好。

HN 为什么提它

在讨论如何扩展 LLM 上下文长度时,评论者提到微软提出的 xPos 是对旋转位置编码做缩放的方案,建议对照阅读,并指出图 1 直观展示了注意力强度。

方法难度 4 / 5约 40 分钟经得起时间
读之前最好知道
1Transformer 与自注意力
2位置编码(正弦编码、RoPE)
3语言建模与困惑度(perplexity)

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
推荐PaulHoule · 2023-03

“I like this feature they are working on”

喜欢他们在做的这项功能,即让 Transformer 的上下文长度超出训练长度
Microsoft Kosmos-1: A Multimodal Large Language Model原评论 ↗
推荐kir-gadjello · 2023-03

“One beautiful method is just using the xPos positional embedding pioneered by Microsoft and scale the context window size at runtime”

推荐 xPos 位置嵌入,可在运行时按需放大上下文窗口
GPT-4 architecture: what we can deduce from research literature原评论 ↗
推荐EnricoShippole · 2023-07

“It is also worth reviewing the paper, A Length-Extrapolatable Transformer, and xPos technique which also applies scaling to rotary embeddings: A Length-Extrapolatable Transformer”

推荐一读,xPos 技术同样对 rotary embedding 做缩放以外推长度
引用chessgecko · 2024-10

“Xpos is another paper by microsoft tackling issues with rope and you can see figure 1 on page 4 to get a visual interpretation of the sinusoidal attention strength”

指出 xPos 针对 RoPE 的问题,并建议看图 1 理解正弦注意力强度
Differential Transformer原评论 ↗