Prompt-Based Speculative Decoding for Grammatical Error Correction
cs.CL
Submitted: 2026-12-01
Updated: 2026-12-01
Comments: 17 pages, 1 figure, 15 tables. Code: https://github.com/richardxoldman/gec-speculative-decoding
License: http://creativecommons.org/licenses/by/4.0/
The gist: 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.
Terminology
Abstract
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.
Related papers
- MedGame: Storytelling Gamification Empowered by Large Language Models for Medical Education
- SparDA: Sparse Decoupled Attention for Efficient Long-Context LLM Inference
- UniVer: A Unified Perspective for Multi-step and Multi-draft Speculative Decoding
- Grounding Text Embeddings in Stakeholder Associations
- Linguistic and Argument Diversity in Synthetic Data for Function-Calling Agents
- TRIM: Achieving Extreme Sparsity with Targeted Row-wise Iterative Metric-driven Pruning