Library · published 2021-08-24 · added 2026-08-21 · github.com

ALiBi (Attention with Linear Biases)

What it is

ALiBi is a method for transformer language models that enables input length extrapolation by adding a linear bias to attention scores instead of using traditional position embeddings. It allows models trained on short sequences to perform inference on much longer sequences without performance degradation.

The problem it solves

Standard position embeddings (learned or sinusoidal) often cause models to fail or become unstable when processing sequences longer than those seen during training.

What you could use it for

NLPTransformersDeep LearningLLMAttention Mechanism

Read the source ↗Back to the library →

Summary written by an AI model from the source; check the source before you rely on it.