2025-02-11 · 专家 · 自然语言处理 · 机器学习

Lossless Acceleration of Large Language Models with Hierarchical Drafting based on Temporal Locality in Speculative Decoding

该论文提出了一种基于时间局部性的分层起草方法(HD),用于加速大型语言模型(LLM)的推理,通过组织不同来源的标记并按时间局部性进行分层,以实现无损加速。

更新于 2025-02-11。作者:Sukmin Cho、Sangjin Choi、Taeho Hwang、Jeongyeon Seo、Soyeong Jeong、Huije Lee、Hoyun Song、Jong C. Park、Youngjin Kwon。

中文摘要

加速大型语言模型(LLMs)的推理对于实现实时交互至关重要,因为它们已经被广泛应用于实际服务中。推测性解码,作为一种完全算法性的解决方案,因其通过草拟和验证标记来提高推理速度,从而在一次正向传递中生成多个标记而受到关注。然而,当前的草拟策略通常需要大量的微调,或者在任务之间表现出不一致的性能。为了解决这些挑战,我们提出了层次草拟(HD),这是一种新颖的无损草拟方法,它基于时间局部性,将各种标记源组织成多个数据库,形成层次框架。在草拟步骤中,HD按照从最高到最低局部性的顺序访问多个数据库,以确保在不同任务上的一致加速,并最小化草拟延迟。我们在Spec-Bench上使用具有70亿和130亿参数的LLMs进行的实验表明,HD优于现有的数据库草拟方法,在模型大小、任务和温度上实现了稳健的推理加速。

英文摘要

Accelerating inference in Large Language Models (LLMs) is critical for real-time interactions, as they have been widely incorporated into real-world services. Speculative decoding, a fully algorithmic solution, has gained attention for improving inference speed by drafting and verifying tokens, thereby generating multiple tokens in a single forward pass. However, current drafting strategies usually require significant fine-tuning or have inconsistent performance across tasks. To address these challenges, we propose Hierarchy Drafting (HD), a novel lossless drafting approach that organizes various token sources into multiple databases in a hierarchical framework based on temporal locality. In the drafting step, HD sequentially accesses multiple databases to obtain draft tokens from the highest to the lowest locality, ensuring consistent acceleration across diverse tasks and minimizing drafting latency. Our experiments on Spec-Bench using LLMs with 7B and 13B parameters demonstrate that HD outperforms existing database drafting methods, achieving robust inference speedups across model sizes, tasks, and temperatures.

解读

一句话总结

该论文提出了一种基于时间局部性的分层起草方法(HD),用于加速大型语言模型(LLM)的推理,通过组织不同来源的标记并按时间局部性进行分层,以实现无损加速。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源