Vegas: Self-Speculative Decoding with Verification-Guided Sparse Attention
Abstract
Lay Summary
How fast a large language model (LLM) generates tokens is an important metric for justifying LLM inference efficiency. To generate each new token, the LLM must consider all previous tokens. Because of this, the token generation process has been a well-known bottleneck, especially for long-context scenarios where there would be millions of previous tokens. To speed up the token generation, an LLM can draft a few tokens by only considering the most important previous tokens. After that, it checks these draft tokens in a single pass and drops inaccurate ones. By doing so repeatedly, the LLM can generate tokens at a faster speed by spending less time considering previous tokens. However, to ensure that draft tokens will not be dropped, it is important to find the truly important previous tokens. In our work Vegas, we achieve this by looking at which previous tokens turned out to be important when an LLM is checking the draft tokens. With this insight, Vegas can find important previous tokens with higher accuracy. Therefore, its draft tokens are more likely to pass the check, enabling it to generate tokens faster. Our experimental results show that it can achieve a 2.8 times speedup over standard methods.