ALiBi | Train Short, Test Long: Attention With Linear Biases Enables Input Length Extrapolation

From the creator

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ JOIN OUR DISCORD COMMUNITY: Discord β–Ί https://discord.gg/peBrCpheKE πŸ“’ SUBSCRIBE TO MY MONTHLY AI NEWSLETTER: Substack β–Ί https://aiepiphany.substack.com/ ❀️ Become The AI Epiphany Patreon ❀️ β–Ί https://www.patreon.com/theaiepiphany In this video I cover ALiBi model from the "Train Short, Test Long: Attention With Linear Biases Enables Input Length Extrapolation" paper. Instead of using positional embeddings (like e.g. the original transformer) they added non-learnable biases directly into the query-key matrix and achieved extraordinary extrapolation results (i.e. great perf on longer sequences). β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ βœ… Paper: https://ofir.io/train_short_test_long.pdf βœ… Code: https://github.com/ofirpress/attention_with_linear_biases β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ ⌚️ Timetable: 00:00 Intro 02:00 Main results 03:30 Time and memory tradeoffs 05:00 ALiBi method explained 10:00 Results, low data regime 12:35 Generalization to different datasets 13:15 Results, big data regime 16:00 Why does it work and future work 21:10 Outro β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ’° BECOME A PATREON OF THE AI EPIPHANY ❀️ If these videos, GitHub projects, and blogs help you, consider helping me out by supporting me on Patreon! The AI Epiphany β–Ί https://www.patreon.com/theaiepiphany One-time donation: https://www.paypal.com/paypalme/theaiepiphany Much love! ❀️ Huge thank you to these AI Epiphany patreons: Eli Mahler Petar VeličkoviΔ‡ Zvonimir Sabljic β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ’‘ The AI Epiphany is a channel dedicated to simplifying the field of AI using creative visualizations and in general, a stronger focus on geometrical and visual intuition, rather than the algebraic and numerical "intuition". β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ πŸ‘‹ CONNECT WITH ME ON SOCIAL LinkedIn β–Ί https://www.linkedin.com/in/aleksagordic/ Twitter β–Ί https://twitter.com/gordic_aleksa Instagram β–Ί https://www.instagram.com/aiepiphany/ Facebook β–Ί https://www.facebook.com/aiepiphany/ πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ JOIN OUR DISCORD COMMUNITY: Discord β–Ί https://discord.gg/peBrCpheKE πŸ“’ SUBSCRIBE TO MY MONTHLY AI NEWSLETTER: Substack β–Ί https://aiepiphany.substack.com/ πŸ’» FOLLOW ME ON GITHUB FOR ML PROJECTS: GitHub β–Ί https://github.com/gordicaleksa πŸ“š FOLLOW ME ON MEDIUM: Medium β–Ί https://gordicaleksa.medium.com/ β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬ #alibi #transformers #extrapolation

Stop watching Β· start building
Matched to AI for Work

Makers residency 4th edition

Your idea can be anything. At our last workshops, people built plant-based nutrition businesses, a way to measure planetary resilience, crochet headwear and a way to connect lonely people living in the same building. An asset manager went on to raise an additional Β£25M on their fund within nine months. The fourth workshop is a full day at KOKO with Nick Sarafa, learning to build with Claude Code. Bring the thing you keep meaning to start. We’ll bring the pizza.

β—† Fri 13 Nov 2026 β—† KOKO, London
Makers residency 4th edition
Live event
Makers residency 4th edition
Fri 13 Nov 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.