Table of Contents
Fetching ...

Temperature-Centric Investigation of Speculative Decoding with Knowledge Distillation

Siru Ouyang, Shuohang Wang, Minhao Jiang, Ming Zhong, Donghan Yu, Jiawei Han, Yelong Shen

TL;DR

This paper delves into the effects of decoding temperatures on speculative decoding's efficacy, and offers new insights into how generation configurations drastically affect the performance of speculative decoding, and underscores the need for developing methods that focus on diverse decoding configurations.

Abstract

Speculative decoding stands as a pivotal technique to expedite inference in autoregressive (large) language models. This method employs a smaller draft model to speculate a block of tokens, which the target model then evaluates for acceptance. Despite a wealth of studies aimed at increasing the efficiency of speculative decoding, the influence of generation configurations on the decoding process remains poorly understood, especially concerning decoding temperatures. This paper delves into the effects of decoding temperatures on speculative decoding's efficacy. Beginning with knowledge distillation (KD), we first highlight the challenge of decoding at higher temperatures, and demonstrate KD in a consistent temperature setting could be a remedy. We also investigate the effects of out-of-domain testing sets with out-of-range temperatures. Building upon these findings, we take an initial step to further the speedup for speculative decoding, particularly in a high-temperature generation setting. Our work offers new insights into how generation configurations drastically affect the performance of speculative decoding, and underscores the need for developing methods that focus on diverse decoding configurations. Code is publically available at https://github.com/ozyyshr/TempSpec.

Temperature-Centric Investigation of Speculative Decoding with Knowledge Distillation

TL;DR

This paper delves into the effects of decoding temperatures on speculative decoding's efficacy, and offers new insights into how generation configurations drastically affect the performance of speculative decoding, and underscores the need for developing methods that focus on diverse decoding configurations.

Abstract

Speculative decoding stands as a pivotal technique to expedite inference in autoregressive (large) language models. This method employs a smaller draft model to speculate a block of tokens, which the target model then evaluates for acceptance. Despite a wealth of studies aimed at increasing the efficiency of speculative decoding, the influence of generation configurations on the decoding process remains poorly understood, especially concerning decoding temperatures. This paper delves into the effects of decoding temperatures on speculative decoding's efficacy. Beginning with knowledge distillation (KD), we first highlight the challenge of decoding at higher temperatures, and demonstrate KD in a consistent temperature setting could be a remedy. We also investigate the effects of out-of-domain testing sets with out-of-range temperatures. Building upon these findings, we take an initial step to further the speedup for speculative decoding, particularly in a high-temperature generation setting. Our work offers new insights into how generation configurations drastically affect the performance of speculative decoding, and underscores the need for developing methods that focus on diverse decoding configurations. Code is publically available at https://github.com/ozyyshr/TempSpec.

Paper Structure

This paper contains 34 sections, 4 equations, 7 figures, 3 tables, 1 algorithm.

Figures (7)

  • Figure 1: Speedup and acceptance rate (y-axises) for different decoding temperatures (x-axis) on Alpaca dataset. The draft model (Llama-68M) is distilled from Llama-2-13B-chat with data generated in $0.2$ temperature.
  • Figure 2: Speedup for different decoding temperatures (y-axis) corresponding to different temperatures during KD (x-axis) for both (a) offline distillation and (b) online distillation for the testing of in-domain Alpaca set.
  • Figure 3: Peak speedup brought by offline distillation and online distillation. The relative speedup for online distillation against offline distillation is depicted in dashed lines.
  • Figure 4: Speedup for different decoding temperatures (y-axis) corresponding to different temperatures during KD (x-axis) for both (a) offline distillation and (b) online distillation for the testing of out-of-domain GSM8K set.
  • Figure 5: The distribution of token length and the frequencies for both Alpaca and GSM8K test sets.
  • ...and 2 more figures