Flash-Decoding parallelizes an axis FlashAttention v2 left alone. Pick which one.
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Flash-Decoding splits the KV cache along the key axis so multiple SMs share the decode work, then reduces partials with log-sum-exp.
Picture a librarian pulling one card from a giant filing cabinet to answer a question. With one librarian and a million cards, she does it alone and the line at the desk gets long. Flash-Decoding hires more librarians, splits the cabinet into drawers, and lets each librarian scan one drawer in parallel. They each pick their best candidate plus a confidence score, then a coordinator at the front combines the candidates into the final answer. The total amount of looking is the same, but the wall clock drops because the work spreads across people. That coordination, combining confidence scored partials into one answer, is what the log-sum-exp combine rule does.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
60s: name the decode bottleneck (query axis vanishes), state the fix (split the key axis), explain the log-sum-exp combine is exact, give the sweet spot (long context + small batch), name production stacks (vLLM, TensorRT-LLM, SGLang).
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Assuming FlashAttention v2 already handles decode well. It optimizes prefill where many queries share K, V loads. Decode has one query, leaving SMs idle on long contexts.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.