SDSAT: Accelerating LLM Inference through Speculative Decoding with Semantic Adaptive Tokens

Chengbo Liu, Yong Zhu
3/27/2024
cs.CL

No official code found. Best implementation: ainergy-ml/SDSAT (5 stars, Apache-2.0, last commit 2024-04-02).

Abstract

We propose an acceleration scheme for large language models (LLMs) through Speculative Decoding with Semantic Adaptive Tokens (SDSAT). The primary objective of this design is to enhance the LLM model's ability to generate draft tokens more accurately without compromising the model's accuracy. The core strategies involve: 1) Fine-tune the model by incorporating semantic adaptive tokens that possess flexible decoding capabilities without changing its structure, allowing them to generate high-quality draft tokens. 2) By employing a training method that does not affect the standard tokens, the model can acquire parallel decoding abilities atop its original framework with minimal training overhead. 3) We have designed the "two-step-draft-then-verify" generation strategies using both greedy search and nucleus sampling. Experiments conducted on the CodeLlama-13B and 7B models have yielded speed increases of over 3.5X and 3.0X, respectively. Please refer to https://github.com/hasuoshenyun/SDSAT.

View on arXivView PDF

Code Implementations(1)

ainergy-ml/SDSATCommunity100%
Apache-2.0

The official implementation of "SDSAT: Accelerating LLM Inference through Speculative Decoding with Semantic Adaptive Tokens"

51Shell, PythonMar 31, 20242 years agoApache-2.0

Cite this paper

@article{liu2024sdsat,
  title  = {SDSAT: Accelerating LLM Inference through Speculative Decoding with Semantic Adaptive Tokens},
  author = {Chengbo Liu and Yong Zhu},
  year   = {2024},
  eprint = {2403.18647},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.18647v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.18647.svg)](https://codeofpaper.com/paper/2403.18647)

Discussion