效率释放:基于LLM的推荐系统结合投机解码的推理加速
Efficiency Unleashed: Inference Acceleration for LLM-based Recommender Systems with Speculative Decoding
AI总结:
本文针对基于LLM的推荐系统离线知识生成效率低的问题,提出LASER框架,通过定制检索池和宽松验证机制加速推理,在公开数据集上实现3-5倍加速并节省约67%计算资源,且保持无损推荐性能。
摘要:
过去几年,基于LLM的推荐系统(RSs)引起了越来越多的兴趣,尽管其工业部署仍处于初级阶段。大多数现有部署将LLM离线用作特征增强器,为下游任务生成增强知识。然而,在包含大量用户和物品的推荐场景中,即使使用LLM进行离线知识生成也需要大量时间和计算资源。这种低效性源于LLM的自回归特性。一个有前景的解决方案是投机解码,这是一种“先起草后验证”的方法,它增加了每次解码步骤生成的token数量。在这项工作中,我们首先确定推荐知识生成是基于检索的投机解码的高度契合用例。然后,我们发现了其两个特征:(1)RS中庞大的物品和用户数量导致检索效率低下,以及(2)RS对LLM生成的文本表现出高度的多样性容忍度。基于这些见解,我们引入了LASER(通过投机解码为基于LLM的推荐系统实现无损加速),其特点是使用定制检索池来提高检索效率,并采用宽松验证来提高草稿token的接受率。LASER在公开数据集上实现了3-5倍的加速,并在大规模广告场景的在线A/B测试中节省了约67%的计算资源,同时保持无损的下游推荐性能。
英文摘要:
The past few years have witnessed a growing interest in LLM-based recommender systems (RSs), although their industrial deployment remains in a preliminary stage. Most existing deployments leverage LLMs offline as feature enhancers, generating augmented knowledge for downstream tasks. However, in recommendation scenarios with numerous users and items, even offline knowledge generation with LLMs demands significant time and computational resources. This inefficiency arises from the autoregressive nature of LLMs. A promising solution is speculative decoding, a Draft-Then-Verify approach that increases the number of tokens generated per decoding step. In this work, we first identify recommendation knowledge generation as a highly fitting use case for retrieval-based speculative decoding. Then, we discern its two characteristics: (1) the vast number of items and users in RSs leads to retrieval inefficiency, and (2) RSs exhibit high diversity tolerance for LLM-generated text. Building on these insights, we introduce Lossless Acceleration via Speculative Decoding for LLM-based Recommender Systems (LASER), which features a Customized Retrieval Pool to enhance retrieval efficiency and Relaxed Verification to improve the acceptance rate of draft tokens. LASER achieves a 3-5x speedup on public datasets and saves about 67\% of computational resources during the online A/B test on a large-scale advertising scenario with lossless downstream recommendation performance. Our code is available at https://github.com/YunjiaXi/LASER
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。