按年被提到
20232023 · 5 次2026
大模型与语言模型›长上下文与测试时计算·arXiv:2306.15595 · cs.CL

Extending Context Window of Large Language Models via Positional Interpolation

通过位置插值扩展大语言模型的上下文窗口
Shouyuan Chen, Sherman Wong, Liangjian Chen, Yuandong Tian · 2023

线性压缩位置索引,让 RoPE 类 LLaMA 少量微调即扩到 32K 上下文

开始阅读 ↗PDFalphaXiv 讨论
被提及 · 6 人首次 2023-06-28 · 最近 2024-01-12
6不同的人
4活跃月份
5讨论串
242被引(OpenAlex)

论文提出位置插值(PI),把基于 RoPE 的预训练 LLM(如 LLaMA)的上下文窗口扩展到最高 32768,只需不到 1000 步微调。做法是把输入位置索引线性缩小到原始窗口范围,而不是外推到训练长度之外,后者可能让注意力分数灾难性地变大;理论上插值的误差上界比外推小约 600 倍,在密钥检索、语言建模和长文摘要等任务上效果良好。

HN 为什么提它

评论者把它当作 Meta 提出的、通过重新缩放位置索引加少量微调来延长上下文的方法;也有人指出 RoPE 缩放此前已有类似工作。

方法难度 4 / 5约 35 分钟经得起时间
读之前最好知道
1Transformer 自注意力
2旋转位置编码(RoPE)
3上下文窗口与长度外推
4LLaMA 与模型微调

HN 书评

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

“There have been recent advances with [A] position interpolation, but those methods explore fine-tuning/loras.”

提到位置插值的新进展,但这些方法依赖微调或 LoRA
XGen-7B, a new 7B foundational model trained on up to 8K length for 1.5T tokens原评论 ↗
引用moffkalast · 2023-07

“Meta came up with it (that paper is theirs)”

指出这是 Meta 的论文:重新缩放位置索引来扩展上下文,需少量重训
Llama 2 – Meta AI原评论 ↗
引用ZeroCool2u · 2023-07

“See: Extending Context Window of Large Language Models via Positional Interpolation”

指向摘要:只需少量微调就把 RoPE 的 LLaMA 上下文扩展到 32768
Llama 2 – Meta AI原评论 ↗
引用filterfiber · 2023-11

“Rope - Extending Context Window of Large Language Models via Positional Interpolation”

贴出它作为用 RoPE 扩展上下文窗口的位置插值方法
Is anyone using self hosted LLM day to day and training it like a new employee原评论 ↗
引用nulld3v · 2024-01

“RoPE scaling has been a thing for a while already: Extending Context Window of Large Language Models via Positional Interpolation”

指出 RoPE 缩放早已有人做过,早于眼前讨论的方法
Phi-2: Self-Extend Boosts Performance, Extends Context to 8k Without Training原评论 ↗
被提交为 story · 1 次