Automatic Task Detection and Heterogeneous LLM Speculative Decoding

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Ge, Danying, Gao, Jianhua, Jiang, Qizhi, Feng, Yifei, Ji, Weixing
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913834657120256
author Ge, Danying
Gao, Jianhua
Jiang, Qizhi
Feng, Yifei
Ji, Weixing
author_facet Ge, Danying
Gao, Jianhua
Jiang, Qizhi
Feng, Yifei
Ji, Weixing
contents Speculative decoding, which combines a draft model with a target model, has emerged as an effective approach to accelerate large language model (LLM) inference. However, existing methods often face a trade-off between the acceptance rate and decoding speed in downstream tasks due to the limited capacity of the draft model, making it difficult to ensure efficiency across diverse tasks. To address this problem, we propose a speculative decoding algorithm tailored for downstream task optimization. It includes an automatic task partitioning and assigning method, which automatically categorizes downstream tasks into different sub-tasks and assigns them to a set of heterogeneous draft models. Each draft model is aligned with the target model using task-specific data, thereby enhancing the consistency of inference results. In addition, our proposed method incorporates an online lightweight prompt classifier to dynamically route prompts to the appropriate draft model. Experimental results demonstrate that the proposed method improves draft accuracy by 6% to 50% over vanilla speculative decoding, while achieving a speedup of 1.10x to 2.64x in LLM inference.
format Preprint
id arxiv_https___arxiv_org_abs_2505_08600
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Automatic Task Detection and Heterogeneous LLM Speculative Decoding
Ge, Danying
Gao, Jianhua
Jiang, Qizhi
Feng, Yifei
Ji, Weixing
Computation and Language
I.2.7
Speculative decoding, which combines a draft model with a target model, has emerged as an effective approach to accelerate large language model (LLM) inference. However, existing methods often face a trade-off between the acceptance rate and decoding speed in downstream tasks due to the limited capacity of the draft model, making it difficult to ensure efficiency across diverse tasks. To address this problem, we propose a speculative decoding algorithm tailored for downstream task optimization. It includes an automatic task partitioning and assigning method, which automatically categorizes downstream tasks into different sub-tasks and assigns them to a set of heterogeneous draft models. Each draft model is aligned with the target model using task-specific data, thereby enhancing the consistency of inference results. In addition, our proposed method incorporates an online lightweight prompt classifier to dynamically route prompts to the appropriate draft model. Experimental results demonstrate that the proposed method improves draft accuracy by 6% to 50% over vanilla speculative decoding, while achieving a speedup of 1.10x to 2.64x in LLM inference.
title Automatic Task Detection and Heterogeneous LLM Speculative Decoding
topic Computation and Language
I.2.7
url https://arxiv.org/abs/2505.08600