Abstract
Chain-of-thought (CoT) reasoning significantly enhances the problem-solving capabilities of large language models (LLMs) but introduces a substantial "reasoning tax" due to the generation of long autoregressive trajectories. Traditional acceleration methods, such as speculative decoding, are often bottlenecked by rigid token-level consistency requirements. We present R-Stitch, a training-free hybrid decoding framework that dynamically delegates computation between a small language model (SLM) and an LLM using token-level entropy as an uncertainty proxy. By "stitching" trajectories rather than enforcing strict verification, R-Stitch leverages the conciseness of smaller models and avoids costly rollbacks. Our method achieves peak speedups of up to 4.10× on complex reasoning benchmarks while maintaining accuracy comparable to full LLM decoding.
The Reasoning Tax and the Consistency Trap
Large Language Models have revolutionized complex problem-solving through Chain-of-Thought prompting. However, generating thousands of intermediate tokens for a single answer is computationally expensive and slow. Existing acceleration strategies primarily rely on speculative decoding, where a fast SLM drafts tokens for a larger LLM to verify.
The fundamental limitation of speculative decoding in reasoning tasks is the consistency trap. It requires the SLM to predict the exact same tokens as the LLM. If an SLM finds a shorter, correct path to an answer that deviates from the LLM's specific stylistic trace, the LLM rejects the sequence and forces a rollback. This prevents systems from exploiting the inherent speed and brevity of smaller models.
R-Stitch: Entropy-Guided Trajectory Stitching
R-Stitch moves away from strict verification toward a "trajectory stitching" approach. The framework monitors the entropy of tokens generated by the SLM; low entropy suggests high confidence, while an entropy spike indicates potential reasoning errors. When uncertainty is high, the system hands control to the LLM to "stitch" the reasoning path, either by correcting a single token or continuing the logic.
Key features of the R-Stitch architecture include:
- Bidirectional Handover: Control can pass from SLM to LLM when uncertainty is high, and back to the SLM once the LLM reaches a stable, low-entropy state.
- Efficient KV Cache Management: To ensure near-instantaneous switching, R-Stitch maintains separate Key-Value (KV) caches for both models, using "partial prefilling" to sync the models only on the new tokens generated since the last handover.
- Adaptive Routing (R-Stitch+): An enhanced version utilizes a lightweight Reinforcement Learning router to dynamically adjust the entropy threshold based on prompt difficulty, optimizing the balance between latency and accuracy.
The Conciseness Advantage
A critical insight of this research is that smaller models, when correct, often produce significantly more concise reasoning traces than their larger counterparts. Traditional speculative decoding punishes this brevity because the traces do not match the LLM's verbose output. R-Stitch, by contrast, embraces this conciseness as a primary source of efficiency.
By allowing the SLM to complete low-complexity segments of the reasoning chain using fewer tokens, R-Stitch reduces both the per-token computation time and the total number of tokens generated. This dual-action acceleration is what allows it to outperform standard decoding methods even when model agreement is low.
Performance and Results
The researchers evaluated R-Stitch across mathematical (AMC, MATH, AIME) and coding (HumanEval, MBPP) benchmarks using models like DeepSeek-R1-Distill-Qwen and QWQ-32B.
- Significant Speedups: R-Stitch achieved peak speedups of 3.00× on DeepSeek-R1-7B, 3.85× on the 14B variant, and 4.10× on QWQ-32B.
- Accuracy Preservation: The framework consistently maintained accuracy within 1% of the full LLM. In specific cases like the AIME benchmark, R-Stitch actually improved performance under strict token budgets by avoiding the truncation of overly long LLM traces.
- Robustness: Unlike speculative decoding, which can sometimes result in speedups of less than 1.0× (slower than baseline) when models disagree, R-Stitch consistently provided gains across varying levels of task difficulty.
Conclusion
R-Stitch demonstrates that strict token-level consistency is an unnecessary burden for accelerating CoT reasoning. By using entropy as a guide for trajectory stitching, we can combine the high-level reasoning of LLMs with the speed and conciseness of SLMs. Future work will focus on optimizing these systems for high-throughput batch environments and exploring parameter-sharing techniques to reduce the memory overhead of maintaining dual models.
Summary updated