arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.26577cs.CLcs.LG
收藏

面向推理成本的动态树结构构建用于大型语言模型高效推理

Inference-Cost-Aware Dynamic Tree Construction for Efficient Inference in Large Language Models

Beihang University(北航大学);E Fund Management Co., Ltd.(E基金管理有限公司)

Yinrong Hong, Zhiquan Tan, Kai Hu

AI总结:

本文提出CAST方法,通过考虑推理成本优化动态树结构,显著提升大型语言模型的推理效率。

摘要:

大型语言模型(LLMs)面临显著的推理延迟挑战,这源于其自回归设计和庞大的规模。为了解决这个问题,推测解码作为一种解决方案,使多个标记的同时生成和验证成为可能。尽管最近的approaches如EAGLE-2和EAGLE-3通过动态树结构改进了推测解码,但它们往往忽略了诸如GPU设备和批量大小等关键系统变量的影响。因此,我们引入了一种新的动态树解码方法,称为CAST,考虑了推理成本,包括GPU配置和批量大小等因素,以动态优化树结构。通过在六个多样任务上进行全面实验,并使用六个不同的LLMs,我们的方法展示了显著的结果,实现了比传统解码方法快5.2倍的速度。此外,它在一般情况下优于现有最先进的技术,从5%到20%。代码可在https://github.com/EAGLE-Research/sglang-eagle4上获得。

英文摘要:

Large Language Models (LLMs) face significant inference latency challenges stemming from their autoregressive design and large size. To address this, speculative decoding emerges as a solution, enabling the simultaneous generation and validation of multiple tokens. While recent approaches like EAGLE-2 and EAGLE-3 improve speculative decoding using dynamic tree structures, they often neglect the impact of crucial system variables such as GPU devices and batch sizes. Therefore, we introduce a new dynamic tree decoding approach called CAST that takes into account inference costs, including factors such as GPU configurations and batch sizes, to dynamically refine the tree structure. Through comprehensive experimentation across six diverse tasks and utilizing six distinct LLMs, our methodology demonstrates remarkable results, achieving speeds up to 5.2 times faster than conventional decoding methods. Moreover, it generally outperforms existing state-of-the-art techniques from 5 % to 20%. The code is available at https://github.com/EAGLE-Research/sglang-eagle4.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑