🤖 AI Summary
To address high inference latency in large language models (LLMs) caused by autoregressive decoding, this paper proposes a novel speculative sampling framework integrating syntactic and semantic consistency. The method introduces the first dual-dimensional consistency modeling mechanism—jointly leveraging syntax-guided semantic constraints and reusable feature representations—within a multi-head draft generation architecture coupled with a continuous verification tree. This design enables efficient parallel candidate token generation and systematic reuse of intermediate verification states. By enforcing structural syntactic priors during semantic drafting and reusing computed features across verification steps, the approach significantly improves token validity and verification throughput. Evaluated on the Spec-bench benchmark, our framework achieves 2.26×–2.60× end-to-end speedup over baseline LLM inference, increases effective token generation rate, reduces computational overhead, and consistently outperforms state-of-the-art speculative sampling methods.
📝 Abstract
Large language models (LLMs) exhibit remarkable reasoning capabilities across diverse downstream tasks. However, their autoregressive nature leads to substantial inference latency, posing challenges for real-time applications. Speculative sampling mitigates this issue by introducing a drafting phase followed by a parallel validation phase, enabling faster token generation and verification. Existing approaches, however, overlook the inherent coherence in text generation, limiting their efficiency. To address this gap, we propose a Speculative Sampling with Syntactic and Semantic Coherence (S$^4$C) framework, which extends speculative sampling by leveraging multi-head drafting for rapid token generation and a continuous verification tree for efficient candidate validation and feature reuse. Experimental results demonstrate that S$^4$C surpasses baseline methods across mainstream tasks, offering enhanced efficiency, parallelism, and the ability to generate more valid tokens with fewer computational resources. On Spec-bench benchmarks, S$^4$C achieves an acceleration ratio of 2.26x-2.60x, outperforming state-of-the-art methods.