Speculative Decoding with CTC-based Draft Model for LLM Inference Acceleration

Zhuofan Wen, Shangtong Gui, Yang Feng
11/25/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: ZhuofanWen/CTC-drafter (8 stars, Apache-2.0, last commit 2024-11-26).

Abstract

Inference acceleration of large language models (LLMs) has been put forward in many application scenarios and speculative decoding has shown its advantage in addressing inference acceleration. Speculative decoding usually introduces a draft model to assist the base LLM where the draft model produces drafts and the base LLM verifies the draft for acceptance or rejection. In this framework, the final inference speed is decided by the decoding speed of the draft model and the acceptance rate of the draft provided by the draft model. Currently the widely used draft models usually generate draft tokens for the next several positions in a non-autoregressive way without considering the correlations between draft tokens. Therefore, it has a high decoding speed but an unsatisfactory acceptance rate. In this paper, we focus on how to improve the performance of the draft model and aim to accelerate inference via a high acceptance rate. To this end, we propose a CTC-based draft model which strengthens the correlations between draft tokens during the draft phase, thereby generating higher-quality draft candidate sequences. Experiment results show that compared to strong baselines, the proposed method can achieve a higher acceptance rate and hence a faster inference speed.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code implementation for "Speculative Decoding with CTC-based Draft Model for LLM Inference Acceleration"

81Shell, PythonNov 26, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{wen2024speculative,
  title  = {Speculative Decoding with CTC-based Draft Model for LLM Inference Acceleration},
  author = {Zhuofan Wen and Shangtong Gui and Yang Feng},
  year   = {2024},
  eprint = {2412.00061},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2412.00061},
  url    = {http://arxiv.org/abs/2412.00061v1},
  journal = {NEURIPS 2024 2024}
}

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/2412.00061.svg)](https://codeofpaper.com/paper/2412.00061)

Discussion