GRIFFIN: Effective Token Alignment for Faster Speculative Decoding

Shijing Hu, Jingyang Li, Xingyu Xie, Zhihui Lu, Kim-Chuan Toh +1 more
2/16/2025
cs.CLcs.AI

Official code: hsj576/GRIFFIN (18 stars, Apache-2.0, last commit 2025-05-12).

Abstract

Speculative decoding accelerates inference in large language models (LLMs) by generating multiple draft tokens simultaneously. However, existing methods often struggle with token misalignment between the training and decoding phases, limiting their performance. To address this, we propose GRIFFIN, a novel framework that incorporates a token-alignable training strategy and a token-alignable draft model to mitigate misalignment. The training strategy employs a loss masking mechanism to exclude highly misaligned tokens during training, preventing them from negatively impacting the draft model's optimization. The token-alignable draft model introduces input tokens to correct inconsistencies in generated features. Experiments on LLaMA, Vicuna, Qwen and Mixtral models demonstrate that GRIFFIN achieves an average acceptance length improvement of over 8% and a speedup ratio exceeding 7%, outperforming current speculative decoding state-of-the-art methods. Our code and GRIFFIN's draft models are released publicly in https://github.com/hsj576/GRIFFIN.

View on arXivView PDF

Code Implementations(1)

hsj576/GRIFFINOfficial100%
Apache-2.0

Official Implementation of "GRIFFIN: Effective Token Alignment for Faster Speculative Decoding"[NeurIPS 2025]

182Shell, PythonFeb 24, 20251 years agoApache-2.0
large-language-modelsllm-inferencespeculative-decoding

Similar Papers

Cite this paper

@article{hu2025griffin,
  title  = {GRIFFIN: Effective Token Alignment for Faster Speculative Decoding},
  author = {Shijing Hu and Jingyang Li and Xingyu Xie and Zhihui Lu and Kim-Chuan Toh and Pan Zhou},
  year   = {2025},
  eprint = {2502.11018},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.11018v3}
}

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

Discussion