~/lightning

Flex Attention for Inference

Lightningat PyTorch Conference 2025 · 2025-10-22..10-23· [machine-learning]
links:none on file
links:none on file
slides:none on file

FlexAttention ships in PyTorch 2.5.0 and implements most attention variants in a few lines of PyTorch; it adds a compiler-driven FlexDecoding backend that uses a split-key reduce to speed short-query long-K inference, reports performance on par with FlashDecoding and markedly faster than SDPA, and exposes a Paged Attention path via block-mask and score-mode conversion utilities with minimal latency overhead while enabling much larger batch sizes. Features also include Grouped Query Attention, nested jagged tensor support, trainable biases, and a create_block_mask helper (wrap with torch.compile).

AI-written summary · about

  1. 0:00Flex Attention intro
  2. 1:44Inference vs training
  3. 3:08Flex Decoding
  4. 4:12Page Attention memory waste
  5. 5:16Flex + Page Attention
  6. 7:48Performance and adoption
  7. 9:14Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.