Rope to Nope and Back Again: A New Hybrid Attention Strategy

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Yang, Bowen, Venkitesh, Bharat, Talupuru, Dwarak, Lin, Hangyu, Cairuz, David, Blunsom, Phil, Locatelli, Acyr
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908606432018432
author Yang, Bowen
Venkitesh, Bharat
Talupuru, Dwarak
Lin, Hangyu
Cairuz, David
Blunsom, Phil
Locatelli, Acyr
author_facet Yang, Bowen
Venkitesh, Bharat
Talupuru, Dwarak
Lin, Hangyu
Cairuz, David
Blunsom, Phil
Locatelli, Acyr
contents Long-context large language models (LLMs) have achieved remarkable advancements, driven by techniques like Rotary Position Embedding (RoPE) (Su et al., 2023) and its extensions (Chen et al., 2023; Liu et al., 2024c; Peng et al., 2023). By adjusting RoPE parameters and incorporating training data with extended contexts, we can train performant models with considerably longer input sequences. However, existing RoPE-based methods exhibit performance limitations when applied to extended context lengths. This paper presents a comprehensive analysis of various attention mechanisms, including RoPE, No Positional Embedding (NoPE), and Query-Key Normalization (QK-Norm), identifying their strengths and shortcomings in long-context modeling. Our investigation identifies distinctive attention patterns in these methods and highlights their impact on long-context performance, providing valuable insights for architectural design. Building on these findings, we propose a novel architecture featuring a hybrid attention mechanism that integrates global and local attention spans. This design not only surpasses conventional RoPE-based transformer models with full attention in both long and short context tasks but also delivers substantial efficiency gains during training and inference.
format Preprint
id arxiv_https___arxiv_org_abs_2501_18795
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Rope to Nope and Back Again: A New Hybrid Attention Strategy
Yang, Bowen
Venkitesh, Bharat
Talupuru, Dwarak
Lin, Hangyu
Cairuz, David
Blunsom, Phil
Locatelli, Acyr
Computation and Language
Long-context large language models (LLMs) have achieved remarkable advancements, driven by techniques like Rotary Position Embedding (RoPE) (Su et al., 2023) and its extensions (Chen et al., 2023; Liu et al., 2024c; Peng et al., 2023). By adjusting RoPE parameters and incorporating training data with extended contexts, we can train performant models with considerably longer input sequences. However, existing RoPE-based methods exhibit performance limitations when applied to extended context lengths. This paper presents a comprehensive analysis of various attention mechanisms, including RoPE, No Positional Embedding (NoPE), and Query-Key Normalization (QK-Norm), identifying their strengths and shortcomings in long-context modeling. Our investigation identifies distinctive attention patterns in these methods and highlights their impact on long-context performance, providing valuable insights for architectural design. Building on these findings, we propose a novel architecture featuring a hybrid attention mechanism that integrates global and local attention spans. This design not only surpasses conventional RoPE-based transformer models with full attention in both long and short context tasks but also delivers substantial efficiency gains during training and inference.
title Rope to Nope and Back Again: A New Hybrid Attention Strategy
topic Computation and Language
url https://arxiv.org/abs/2501.18795