Speculative decoding accelerates LLM inference by drafting tokens that the target model verifies in parallel, making the output exactly the same as with standard decoding. Grammatical error correction (GEC) is a natural fit -- the output largely reuses spans of the input, so drafts can be taken from the prompt itself.
Prior work on prompt-based speculation for GEC, most notably aggressive decoding (AD), targets seq2seq models evaluated only at batch size 1.
We present the first systematic study of prompt-based speculative decoding for GEC with decoder-only LLMs under batched serving, covering aggressive decoding and n-gram drafting across English, German and Ukrainian document-level datasets and batch sizes up to 128.
Prompt-based drafting reaches a 12.24x speedup at batch size 1, whereas a draft-model baseline is slower than autoregressive decoding in 53 of 60 configurations.
We further introduce PAN-SD, a position-aware variant of n-gram drafting that breaks ties among equally long matches by alignment with the source rather than earliest occurrence. It improves the acceptance rate in all configurations and throughput in most, at no additional cost.
We release our code, data and models.