Exact Relative-Position Attention Kernels Deliver Up to 21x Backward Speedup at 8K Context

INSAIT-Institute · hf · 2026-11-09

INSAIT researchers propose an exact tiled attention algorithm that folds additive relative-position terms into FlashAttention-style computation via offset-aware tiling, product reuse across forward/backward passes, and offset-based gradient sharding. A unified Triton implementation yields 1.8–6.4x forward and 2.0–21x backward speedups at 8K-token sequences, cuts peak memory up to 128x over the strongest baseline per mechanism, and enables end-to-end long-context transcription 1.8x faster with 2.4x less memory — a drop-in replacement for relative-position transformers.

Original post →

More from Infra

Infra channel →