← Latest papers
💬 NLP

SpecLA: Efficient Speculative Decoding for Linear-Attention Models

This paper introduces SpecLA, an efficient speculative decoding runtime designed specifically for stateful linear-attention models that utilizes topology-aware verification, compact state recovery, and a target-aligned drafter to achieve up to 1.70x end-to-end speedup over standard autoregressive decoding.

Original authors: Zhibin Wang, Xuying Han, Zhaohua Yang, Fuliang Liu, Xue Li, Rong Gu, Sheng Zhong, Chen Tian

Published 2026-07-21
📖 5 min read🧠 Deep dive

Original authors: Zhibin Wang, Xuying Han, Zhaohua Yang, Fuliang Liu, Xue Li, Rong Gu, Sheng Zhong, Chen Tian

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to write a story, but you have a very strict editor who only lets you write one word at a time. Before you can write the next word, you have to stop, check your entire notebook of everything you've written so far, update your mental state, and then write the next word. This is how many powerful AI models currently work: they generate text one token (word part) at a time, constantly shuffling a massive amount of data back and forth between their fast memory and their main storage. This process is slow, like a librarian who has to walk to the back of the library to check a book for every single word you say.

To speed this up, scientists invented a trick called "speculative decoding." Imagine instead of writing one word, you have a fast, slightly less smart assistant who guesses the next few words for you. You then ask your strict editor to check all those guesses at once. If the editor agrees, you get to write several words in the time it usually takes to write one. This works great for the standard type of AI models (Transformers) because they keep a list of all past words that is easy to edit. But there's a new, faster type of AI model (called Linear-Attention) that doesn't keep a list; instead, it keeps a single, dense "summary state" that changes every time a new word is added. The old tricks for guessing multiple words don't work here because you can't just "erase" a wrong guess from a summary state without rewriting the whole thing. This is the puzzle researchers are trying to solve: how do we get the speed of guessing multiple words ahead without breaking the unique way these new models remember things?

Enter SpecLA, a new system designed specifically to make this "guessing ahead" trick work for these stateful, linear-attention models. The researchers found that simply trying to force the old guessing methods onto these new models fails miserably. If you try to check guesses one by one, you lose the speed advantage because you're still shuffling the heavy summary state around for every single guess. If you try to check them all at once like a batch, the math gets messy and slow because the guesses might branch off in different directions, and the model's memory doesn't handle branching well.

So, the team built SpecLA, which acts like a smart traffic controller for these AI models. Instead of treating every guess as a separate trip, SpecLA looks at the shape of the guesses. If the guesses form a straight line, it keeps the model's memory state right on the fast processor chip, avoiding the slow walk to the main storage. If the guesses branch out like a tree, it uses a special "tree mask" to check them all at once without mixing up the different paths. Most importantly, when the strict editor says "yes" to some guesses and "no" to others, SpecLA doesn't waste time rewriting the whole memory state. Instead, it saves tiny, compact "receipts" (called factors) of the changes during the checking process. Once the decision is made, it uses these receipts to update the memory state instantly, skipping the heavy lifting entirely.

The results are promising. When tested on a powerful NVIDIA H100 computer using a public model called GDN-1.3B, SpecLA managed to make the AI write text up to 1.70 times faster than the standard, one-word-at-a-time method. In some tests, it was 1.42 times faster, and in others, 1.06 times faster. The researchers also ran smaller tests to see why it worked so well. They found that their new "hybrid" way of checking tree-shaped guesses was 1.80 to 7.11 times faster than the old way of replaying guesses one by one. They also discovered that using those compact "receipts" to update the memory was 2.74 to 4.28 times faster than replaying the words, and delaying the final update until the next step saved another 1.15 to 1.44 times in time.

However, the paper is careful to note that this speedup depends on the "guessing assistant" being good. If the assistant makes too many bad guesses, the system spends time checking them only to reject them, and the speed benefit disappears. The researchers showed that for the system to work well, the assistant needs to be accurate enough that at least 70% to 80% of the guesses are accepted. If the assistant is perfect, the speed could theoretically go even higher, but with a real-world assistant, the gains are solid but depend on the quality of the guesses. The paper doesn't claim this solves every problem for every AI model, but it proves that for this specific type of stateful model, a new, tailored approach is necessary and effective.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →