Faster Than Flash: Exploiting Attention Sparsity for Efficient Long-Context Decoding
Abstract
Lay Summary
Large language models today can read very long texts, but generating responses word by word becomes extremely slow. The reason is that for each new word, the model needs to scan through everything it has read so far, and moving all that data from memory to the processor becomes the bottleneck. We propose a method called Faster Flash Decoding that greatly speeds up this process. Instead of checking every piece of past information, our approach makes a quick first pass using a heavily compressed version of the stored data to identify which parts are actually relevant, and then only loads those parts for detailed processing. This strategy avoids storing extra indexing information and adapts naturally to different situations. Our method works on existing models without any retraining, achieves up to 11.6 times faster processing, and can handle inputs as long as an entire novel, all while keeping the model's output quality unchanged.