Methods › General › Position Embeddings › ALiBi
Attention with Linear Biases
ALiBi
Introduced by Ofir Press et al. in Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
ALiBi, or Attention with Linear Biases, is a positioning method that allows Transformer language models to consume, at inference time, sequences which are longer than the ones they were trained on.
ALiBi does this without using actual position embeddings. Instead, computing the attention between a certain key and query, ALiBi penalizes the attention value that that query can assign to the key depending on how far away the key and query are. So when a key and query are close by, the penalty is very low, and when they are far away, the penalty is very high.
This method was motivated by the simple reasoning that words that are close-by matter much more than ones that are far away.
This method is as fast as the sinusoidal or absolute embedding methods (the fastest positioning methods there are). It outperforms those methods and Rotary embeddings when evaluating sequences that are longer than the ones the model was trained on (this is known as extrapolation).
Papers archive 2025-07-28
19 shown of 19, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
A standard transformer and attention with linear biases for molecular conformer generation 24 Jun 2025 · 0 repositories · arXiv:2506.19834
-
SeqPE: Transformer with Sequential Position Encoding 16 Jun 2025 · 1 repository · arXiv:2506.13277Syntology ran 4 of 12 samples · 8 unverified · 12 pointer-only (licence)
-
Context-aware Biases for Length Extrapolation 11 Mar 2025 · 1 repository · arXiv:2503.08067Syntology ran 1 of 1 samples · 0 unverified · 1 pointer-only (licence)
-
zScore: A Universal Decentralised Reputation System for the Blockchain Economy 17 Feb 2025 · 0 repositories · arXiv:2503.05718
-
Linear Recency Bias During Training Improves Transformers' Fit to Reading Times 17 Sep 2024 · 0 repositories · arXiv:2409.11250
-
Towards Inducing Document-Level Abilities in Standard Multilingual Neural Machine Translation Models 21 Aug 2024 · 0 repositories · arXiv:2408.11382
-
Mitigate Position Bias in Large Language Models via Scaling a Single Dimension 4 Jun 2024 · 1 repository · arXiv:2406.02536Syntology ran 16 of 22 samples · 6 unverified
-
Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding? 9 May 2024 · 0 repositories · arXiv:2405.06105
-
MEP: Multiple Kernel Learning Enhancing Relative Positional Encoding Length Extrapolation 26 Mar 2024 · 0 repositories · arXiv:2403.17698
-
Audiobox: Unified Audio Generation with Natural Language Prompts 25 Dec 2023 · 0 repositories · arXiv:2312.15821
-
ScorePerformer: Expressive Piano Performance Rendering With Fine-Grained Control 4 Nov 2023 · 1 repository
-
HyPE: Attention with Hyperbolic Biases for Relative Positional Encoding 30 Oct 2023 · 0 repositories · arXiv:2310.19676
-
BTLM-3B-8K: 7B Parameter Performance in a 3B Parameter Model 20 Sep 2023 · 1 repository · arXiv:2309.11568Syntology ran 6 of 8 samples · 2 unverified
-
SlimPajama-DC: Understanding Data Combinations for LLM Training 19 Sep 2023 · 1 repository · arXiv:2309.10818
-
Voicebox: Text-Guided Multilingual Universal Speech Generation at Scale 23 Jun 2023 · 1 repository · arXiv:2306.15687Syntology ran 8 of 10 samples · 2 unverified
-
The Impact of Positional Encoding on Length Generalization in Transformers 31 May 2023 · 2 repositories · arXiv:2305.19466Syntology ran 0 of 7 samples · 7 unverified
-
A Vector Quantized Approach for Text to Speech Synthesis on Real-World Spontaneous Speech 8 Feb 2023 · 1 repository · arXiv:2302.04215Syntology ran 2 of 2 samples · 0 unverified
-
Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysis 20 Dec 2022 · 0 repositories · arXiv:2212.10356
-
Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 27 Aug 2021 · 10 repositories · arXiv:2108.12409Syntology ran 13 of 16 samples · 3 unverified · 5 pointer-only (licence)
Tasks archive 2025-07-28
20 shown of 29 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
| Task | Papers |
|---|---|
| Position | 5 |
| Decoder | 4 |
| Language Modeling | 4 |
| Language Modelling | 4 |
| Sentence | 2 |
| Speech Synthesis | 2 |
| Text to Speech | 2 |
| Text-To-Speech Synthesis | 2 |
| text-to-speech | 2 |
| 8k | 1 |
| Audio Generation | 1 |
| AudioCaps | 1 |
| Code Generation | 1 |
| Diversity | 1 |
| Drug Discovery | 1 |
| FAD | 1 |
| Image Classification | 1 |
| In-Context Learning | 1 |
| Inductive Bias | 1 |
| Knowledge Distillation | 1 |
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections