RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
Glossary / Transformer & LLM components / ALiBi (Attention with Linear Biases)
Transformer & LLM components

ALiBi (Attention with Linear Biases)

ALiBi is a positional encoding scheme that biases attention scores by a linear function of token distance, instead of injecting position into queries and keys. Used in MPT (early MosaicML models) and BLOOM.

Advantage: clean extrapolation to lengths beyond training. A model trained on 2K context with ALiBi often handles 8K+ at inference with no fine-tuning, where RoPE degrades.

ALiBi has fallen out of favor — most current open-weight LLMs use RoPE with YaRN or similar extensions instead. Worth knowing because BLOOM and several derivative models still ship with it, and the local inference stack handles ALiBi differently from RoPE.

Practical example

An operator resurrecting an old BLOOM-176B derivative for a legacy multilingual project notices their llama.cpp config script — copy-pasted from a Llama 3 setup — has RoPE scaling flags that do nothing, because BLOOM uses ALiBi instead of RoPE for positional encoding. The inference engine has to branch on architecture: ALiBi models bias attention scores directly with a fixed linear penalty per distance, so there's no rope_freq_base or rope_freq_scale to tune at all. On the plus side, when the operator needs to push context past BLOOM's training length for a batch job, it degrades far more gracefully than an untuned RoPE model would — no YaRN or NTK scaling required, since ALiBi's linear bias was designed to extrapolate. Worth knowing before you assume every GGUF conversion in your model zoo takes the same context-scaling flags.

Related terms

Context WindowYaRN (Yet another RoPE eNlargement)Rotary Position Embedding (RoPE)

Reviewed by Eruo Fredoline. See our editorial policy.

Buyer guides
  • Best GPU for local AI →
  • Best laptop for local AI →
  • Best Mac for local AI →
When it doesn't work
  • CUDA out of memory →
  • Ollama running slowly →
  • ROCm not detected →