Introduction
Large Language Models (LLMs) are powerful but computationally expensive, leading to slow inference speeds. Speculative decoding has emerged as a primary solution, employing a small, fast "drafter" model to predict next tokens, which are then verified in parallel by the larger "target" model. While effective for English, this technique often fails in multilingual contexts. Standard drafters, typically trained on English-centric datasets like ShareGPT, struggle with non-English distributions, causing verification to fail frequently and erasing potential speed gains.
The Specialized Drafter Approach
To address the performance gap in multilingual tasks, this research introduces a "pretrain-and-finetune" (P-F) strategy to create language-specific specialized drafters. The training pipeline consists of three main stages:
- Pretraining (P): A small model (e.g., Vicuna 68M) is pretrained on general corpora (C4, ShareGPT) to establish foundational language modeling capabilities.
- Finetuning (F): The model is then specialized for a specific lingual task, such as German-to-English translation.
- Self-Distillation: To align the drafter's predictions with the target LLM, the target model generates the training data. The drafter is trained to mimic the target model's token distributions across various temperatures, effectively becoming a high-fidelity "mini-me" for the specific language pair.
Key Insights: Data, Domain, and Efficiency
The study reveals several critical properties of specialized drafters:
- The Logarithmic Law of Drafters: The speedup ratio is logarithmically proportional to the volume of task-specific training tokens. While more data improves performance, the most significant gains occur with initial moderate amounts of specialized data.
- Input Domain Sensitivity: A drafter's effectiveness is primarily determined by the input language rather than the output. For instance, a drafter specialized for German-to-English generalizes well to other German-to-X tasks but fails on French-to-English tasks, indicating that the main challenge lies in processing the prompt context.
- Optimal Model Size: Counter-intuitively, smaller models can outperform larger ones. A 68M parameter drafter was found to be more effective than a 1B parameter version because the latter introduced memory bandwidth bottlenecks that slowed down the speculative cycle.
Performance Results
The specialized drafter strategy consistently outperforms general-purpose baselines across various translation benchmarks. On the WMT16 German-to-English task, the P-F approach achieved a 2.42x speedup, more than doubling the 1.19x speedup of previous state-of-the-art general drafters.
Furthermore, the average acceptance length—the number of tokens correctly predicted per cycle—increased from 1.47 to 3.03. Importantly, because speculative decoding relies on target model verification, these speed gains are achieved with zero loss in output quality, as confirmed by GPT-4o evaluations.
Future Directions
While highly effective, specialized drafters increase deployment complexity by requiring a library of language-specific models. Future research will focus on developing automated routing systems to select the appropriate drafter based on input detection and exploring "multi-task" drafters capable of handling clusters of related languages without sacrificing speed.
Summary updated