paper-with-me

Papers

Context-aware Biases for Length Extrapolation

2025-03-11 · Ali Veisi, Amir Mansourian

Transformers' ability to generalize to longer sequences than they have been trained on, known as length extrapolation, degrades as sequence length increases. Most of Relative Positional Encoding (RPE) methods address this problem by either adding constant linear biases or learning general biases, lacking the ability to specialize for different sequences. In this work, inspired by ALiBi, we propose Context-aware Biases for Length Extrapolation (Cable), that learns token-specific biases for each head in decoder-based transformers. Cable learns adaptive, context-aware biases, overcoming the limitations of fixed patterns by adding dynamic biases specific to each token in the sequence. Results show that when tested on a sequence length of 1024, a GPT-3 Medium (334M parameters) with our positional encoding, trained on a sequence length of 512, achieves better perplexity (-0.65) than a similar network with sinusoidal positional encoding trained on a sequence length of 1024. This is achieved with 48% lower memory usage, and only 3.5% higher training time. Furthermore, our method notably improves the extrapolation ability of existing RPE methods on the Edu-FineWeb10B and WikiText-103 datasets. Code is available at: https://github.com/axiomlab/Cable

📄 PDF Abstract BibTeX arXiv:2503.08067

Code (1)

axiomlab/Cable 공식 구현 pytorch

Tasks

Decoder

Methods 이 논문이 사용한 방법론

Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
{Dispute@FaQ-s}How to file a dispute with Expedia? How to file a dispute with Expedia? To file a complaint against Expedia, first try contacting their customer service directly. You can reach them by phone at…
15 Ways to Contact How can i speak to someone at Delta Airlines 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Attention 설명 없음
Weight Decay 설명 없음
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

ParallelComp: Parallel Long-Context Compressor for Length Extrapolation

2025-02-20 · Jing Xiong, Jianghan Shen, Chuanyang Zheng, Zhongwei Wan 외

Efficiently handling long contexts is crucial for large language models (LLMs). While rotary position embeddings (RoPEs) enhance length generalization, effective length extrapolation remains challenging and often require…

4k8kGPU

Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation

2021-08-27 · ICLR 2022 4 · Ofir Press, Noah A. Smith, Mike Lewis

Since the introduction of the transformer model by Vaswani et al. (2017), a fundamental question has yet to be answered: how does a model achieve extrapolation at inference time for sequences that are longer than it saw …

Inductive BiasPlaying the Game of 2048PositionWord Embeddings

Position Interpolation Improves ALiBi Extrapolation

2023-10-18 · Faisal Al-Khateeb, Nolan Dey, Daria Soboleva, Joel Hestness

Linear position interpolation helps pre-trained models using rotary position embeddings (RoPE) to extrapolate to longer sequence lengths. We propose using linear position interpolation to extend the extrapolation range o…

Language ModellingPositionRetrieval

Scaling Laws of RoPE-based Extrapolation

2023-10-08 · Xiaoran Liu, Hang Yan, Shuo Zhang, Chenxin An 외

The extrapolation capability of Large Language Models (LLMs) based on Rotary Position Embedding is currently a topic of considerable interest. The mainstream approach to addressing extrapolation with LLMs involves modify…

16k

CLEX: Continuous Length Extrapolation for Large Language Models

2023-10-25 · Guanzheng Chen, Xin Li, Zaiqiao Meng, Shangsong Liang 외

Transformer-based Large Language Models (LLMs) are pioneering advances in many natural language processing tasks, however, their exceptional capabilities are restricted within the preset context window of Transformer. Po…

4kPosition