Skip to main content
QUICK REVIEW

[论文解读] MrRoPE: Mixed-radix Rotary Position Embedding

Qingyuan Tian, Wenhong Zhu|arXiv (Cornell University)|Jan 28, 2026
Topic ModelingComputer Science被引用 0
一句话总结

本文提出 MrRoPE,一种统一的混基数框架,用于扩展基于 RoPE 的上下文窗口,并提出训练无关的变体 MrRoPE-Uni 与 MrRoPE-Pro,其中 MrRoPE-Pro 在无需微调的情况下提供强大的长上下文性能。

ABSTRACT

Rotary Position Embedding (RoPE)-extension refers to modifying or generalizing the Rotary Position Embedding scheme to handle longer sequences than those encountered during pre-training. However, current extension strategies are highly diverse and lack a unified theoretical foundation. In this paper, we propose MrRoPE (Mixed-radix RoPE), a generalized encoding formulation based on a radix system conversion perspective, which elegantly unifies various RoPE-extension approaches as distinct radix conversion strategies. Based on this theory, we introduce two training-free extensions, MrRoPE-Uni and MrRoPE-Pro, which leverage uniform and progressive radix conversion strategies, respectively, to achieve 'train short, test long' generalization. Without fine-tuning, MrRoPE-Pro sustains over 85% recall in the 128K-context Needle-in-a-Haystack test and achieves more than double YaRN's accuracy on Infinite-Bench retrieval and dialogue subsets. Theoretical analysis confirms that MrRoPE-Pro effectively raises the upper bound of RoPE's attainable encoding length, which further validates the reliability and utility of our theory and methodology.

研究动机与目标

  • 提供一个统一的理论框架,在基数(底数)转换理论下统一 RoPE 的扩展。
  • 引入训练无关的扩展 MrRoPE-Uni(均匀基数)和 MrRoPE-Pro(渐进基数)以实现对长上下文的泛化。
  • 分析混合基数策略如何影响高频和中频 RoPE 维度,以缓解域外(OOD)问题。
  • 在多种基础模型和长上下文基准测试中展示不进行额外训练的实际性能提升。

提出的方法

  • 将 RoPE 扩展表述为对旋转频率的混基数基数转换运算。
  • 用一个控制各维度扩展的基数向量 lambda 来定义 MrRoPE 框架(等式 Eq. 15)。
  • 提出 MrRoPE-Uni:对中间维度进行均匀基数扩展以实现总扩展量 S(Eq. 13)。
  • 提出 MrRoPE-Pro:在中间维度上进行渐进式基数扩展,并通过 epsilon_j 推导以满足总扩展(Eq. 14)。
  • 将现有 RoPE 扩展(NTK 感知插值、YaRN)作为在 MrRoPE 框架内的实例进行对比。
  • 提供在长上下文任务上的训练无关评估(困惑度、RULER、Needle-in-a-Haystack、Infinite-Bench)以及对 RoPE 上界与注意力稳定性的理论分析。
Figure 1: The overall framework of our work. Our key contributions are: (1) a unified theoretical framework for major RoPE-extensions, reflecting them into a specific radix conversion behavior; (2) a progressive radix conversion method MrRoPE-Pro, which outperforms other SoTA methods across various
Figure 1: The overall framework of our work. Our key contributions are: (1) a unified theoretical framework for major RoPE-extensions, reflecting them into a specific radix conversion behavior; (2) a progressive radix conversion method MrRoPE-Pro, which outperforms other SoTA methods across various

实验结果

研究问题

  • RQ1如何将 RoPE 扩展在基数转换视角下统一?
  • RQ2均匀基数策略与渐进基数策略在将 RoPE 扩展到更长上下文时是否会带来不同的性能?
  • RQ3在不进行微调的前提下,渐进基数扩展是否能显著扩展有效上下文长度?
  • RQ4中间(中间段)维度如何影响注意力得分分布以及 RoPE 编码长度的上界?
  • RQ5在标准长上下文基准测试中,MrRoPE-Uni 与 MrRoPE-Pro 相较 YaRN 与基于 NTK 的方法有何表现?

主要发现

  • MrRoPE 提供一个统一理论,将主要的 RoPE 扩展方法与基数转换联系起来,YaRN 与 NTK 为特殊情形。
  • MrRoPE-Pro(渐进基数)在合成与真实世界的长上下文评估中实现了更优、持续的增益。
  • 在 proofpile 风格的困惑度测试中,MrRoPE-Pro 在各种模型和上下文长度下达到最低困惑度,超越 YaRN 与 MrRoPE-Uni。
  • MrRoPE-Pro 将理论 RoPE 上下文窗口上界(RoPE 上界理论)从 1K 提升至 28K,基数为 10,000,相较 YaRN 近五倍。
  • 在长上下文基准测试(Needle-in-a-Haystack、RULER、Infinite-Bench)中,MrRoPE-Pro 显著优于 YaRN,接近或超越某些经微调的长上下文模型,且无需额外训练。
  • 理论分析表明 MrRoPE-Pro 稳定了中间维度的注意力,并扩大了有效上下文窗口。
Figure 2: The biased positional estimate $\hat{m}$ of RoPE across different base.
Figure 2: The biased positional estimate $\hat{m}$ of RoPE across different base.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。