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

The Impact of Positional Encoding on Length Generalization in Transformers

位置编码对 Transformer 长度泛化的影响
Amirhossein Kazemnejad, Inkit Padhi, Karthikeyan Natesan Ramamurthy, Payel Das, Siva Reddy · 2023

比较五种位置编码,发现不加位置编码的NoPE泛化更好

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 5 人首次 2023-06-03 · 最近 2026-10-14
5不同的人
5活跃月份
6讨论串
61被引(OpenAlex)

论文系统比较了仅解码器 Transformer 在五种位置编码(APE、T5 相对位置编码、ALiBi、Rotary 及无位置编码 NoPE)下的长度泛化表现,覆盖多项推理和数学任务。结果显示 ALiBi、Rotary 和 APE 并不适合下游任务的长度泛化,而 NoPE 更好且不需额外计算;理论上 NoPE 能表示绝对和相对位置编码,实际训练后接近 T5 的相对位置注意力。此外,scratchpad 并不总是有帮助,其格式影响很大。

HN 为什么提它

HN 评论在谈论 NoPE(完全不用位置编码)以及位置编码与长度泛化时引用它,把它当作“丢掉位置编码也可行”的证据。

实证研究难度 4 / 5约 45 分钟经得起时间
读之前最好知道
1Transformer 架构
2位置编码(绝对、相对、ALiBi、Rotary)
3长度泛化(length generalization)
4scratchpad 推理

HN 书评

推荐在前,同类按时间 · 每篇最多保留 20 条,统计用全部提及
引用miven · 2025-04

“layers using what's called NoPE [1], not encoding positions at all”

引用 NoPE:完全不编码位置,由模型自己推断 token 顺序
The Llama 4 herd原评论 ↗
引用spmurrayzzz · 2025-04

“But here are some notable ones, a couple of them are linked in their blog post.”

列为位置编码与长度泛化方面值得一看的论文之一
Llama 4 Now Live on Groq原评论 ↗
引用krackers · 2025-07

“The paper showing that dropping positional encoding entirely is feasible is The Impact of Positional Encoding on Length Generalization in Transformers”

引作证据:完全去掉位置编码是可行的
LLM Embeddings Explained: A Visual and Intuitive Guide原评论 ↗
引用krackers · 2026-10

“I thought with NoPE schemes”

提到 NoPE 方案,Transformer 可不用位置编码做长度泛化
Is 'Attention' the Essence of Intelligence?原评论 ↗
被提交为 story · 2 次