arXiv:2610.29527cs.CLOct 2026

Manuscript Offprint

arXiv:2610.29527

RCSD: Reinforcement and Continual Learning for Domain-Specific Speculative Decoding

Mingkang Liu, Weiming Meng, Peipei Jiao, Jiawei Zhang, Tianyuan Liu, Junyan Li, Lichen Pang

ABSTRACT

Speculative decoding accelerates large language model inference by employing a compact draft model to propose candidate tokens that are verified in parallel by a target model. Conventional training relies on soft-label distillation, which forces the draft model to mimic the target's full output distribution—including high-entropy regions that degrade acceptance rates and increase early rejection risk. We propose RCSD (Reinforcement and Continual Learning for Speculative Decoding), a training framework that aligns draft model optimization with the system-level objective of maximizing acceptance length. RCSD leverages naturally occurring accepted and rejected sequences during speculative inference to construct implicit preference pairs, with masked loss to avoid penalizing target-aligned tokens. Evaluated across multiple benchmarks, RCSD improves average acceptance length by 35% over HASS and achieves 1.35×1.35\times faster end-to-end inference than HASS on practical workloads, without compromising generation quality.

1 Introduction

Large language models (LLMs) have demonstrated remarkable capabilities across a wide range of tasks. However, their autoregressive nature leads to high computational costs and significant latency during inference, which hinders their deployment in real-time applications. To address this bottleneck, speculative decoding has emerged as a prominent acceleration paradigm [4,2]^{[4, 2]}. This approach leverages a fast draft model to generate multiple candidate tokens speculatively, which are then verified in parallel by the larger, more accurate target model. By accepting or rejecting these candidates in bulk, speculative decoding can substantially improve the overall throughput of the system.

The prevailing training strategy for draft models relies heavily on soft-label distillation[5], where the draft model is supervised to mimic the full output probability distribution of the target model. This method implicitly minimizes the forward Kullback-Leibler (KL) divergence, compelling the draft model to cover all modes of the teacher's distribution, including high-entropy regions with low-probability tokens. While it is theoretically true that minimizing the KL divergence to zero would result in the draft model perfectly replicating the target model and thus achieving the maximum possible acceptance length, this goal is practically unattainable. The draft model, being orders of magnitude smaller than the target, lacks the capacity to faithfully reproduce the complex distribution of its teacher. However, exact probability replication is not requisite. To maximize acceptance length, it suffices for the relative ordering of the top-k most probable tokens in the draft model to align with that of the base model. Consequently, a fundamental misalignment arises: the training objective (distribution matching) diverges from the ultimate system-level goal (maximizing the number of accepted tokens). For instance Figure 1, a draft model might accurately capture the relative ranking of the top-k tokens but fail to precisely replicate their exact probabilities, leading to a perfect acceptance rate despite a large distillation loss.

This misalignment motivates our core insight: the draft model should transcend the role of a faithful imitator to become an efficiency-oriented predictor. Specifically, we advocate for a ‘mode-seeking’ behavior rather than ‘mode-covering’, thereby concentrating predictive capacity on sequences with high acceptance probability, even if this necessitates disregarding low-probability tails of the target distribution. Ultimately, the optimization goal is redefined: rather than minimizing the divergence of logits, the system aims to maximize the expected acceptance length.

*code can be released at https://github.com/ooolmk/RCSD-reinforcement-continue-learning-for-speculative-sampling

Figure

low kl-loss &

low acceptance lenth

high kl-loss &

low acceptance lenth

Figure

high acceptance lenth

high kl-loss &

high acceptance lenth

Figure 1: Misalignment between KL divergence and acceptance rate. Due to limited parameters, the draft model cannot perfectly replicate the target distribution. However, low KL loss may still lead to token rejection. This discrepancy arises because speculative decoding acceptance depends on the relative ranking of top candidate tokens rather than exact distribution matching.

To bridge this gap, we propose RCSD (Reinforcement & Continual Learning for Speculative Decoding), a novel training framework that directly aligns the draft model's optimization with the system's performance metric. RCSD capitalizes on the intrinsic feedback loop of speculative decoding, where every verification step naturally produces pairs of accepted and rejected token sequences. We leverage these implicit preference signals to train the draft model using reinforcement learning principles. Specifically, we adapt two powerful algorithms: Direct Preference Optimization (DPO)[7] and Group-wise Relative Policy Optimization (GRPO)[8]. In our DPO formulation, a sequence sampled purely from the target model serves as the “chosen” response, while a sequence generated through periodic alternation between the target and draft models (every k steps) acts as the “rejected” response. Our GRPO approach constructs groups of sequences with varying drafting strategies (different k-step intervals) and uses the acceptance rate over these sequences as a direct and verifiable reward signal to optimize the expected acceptance length.

Our experiments on both Qwen3-1.7B and Llama-3.1-8B demonstrate the efficacy of RCSD. It achieves an average improvement of 35% in acceptance length over conventional distillation baselines(HASS) [10] and delivers a 1.35×1.35\times speedup on practical workloads like ShareGPT, all without compromising the quality of the final output. To our knowledge, this work is the first to systematically integrate preference optimization techniques like DPO and GRPO into the training pipeline for speculative decoding, establishing a new paradigm for building highly efficient draft models.