arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2602.22647cs.IRcs.CLcs.LG
收藏

将尝试矢量化:为基于LLM的生成检索在加速器上实现高效的受限解码

Vectorizing the Trie: Efficient Constrained Decoding for LLM-based Generative Retrieval on Accelerators

Yale University(耶鲁大学);Google DeepMind(谷歌DeepMind)

Zhengyang Su, Isay Katsman, Yueqi Wang, Ruining He, Lukasz Heldt, Raghunandan Keshavan, Shao-Chuan Wang, Xinyang Yi, Mingyan Gao, Onkar Dalal, Lichan Hong, Ed Chi, Ningren Han

AI总结:

STATIC通过矢量化技术实现高效受限解码,显著提升基于LLM的生成检索性能。

摘要:

生成检索已成为基于LLM的推荐系统中一种强大的范式。然而,工业推荐系统往往受益于根据业务逻辑限制输出空间到一个受限的商品子集(例如强制内容新鲜度或产品类别),而标准的自回归解码无法原生支持此类限制。此外,现有的利用前缀树(Tries)的受限解码方法在硬件加速器(TPUs/GPUs)上会造成严重的延迟惩罚。在本工作中,我们引入了STATIC(稀疏转移矩阵加速的Trie索引用于受限解码),这是一种专门为在TPUs/GPUs上实现高吞吐量的基于LLM的生成检索而设计的高效且可扩展的受限解码技术。通过将前缀树扁平化为一个静态的压缩稀疏行(CSR)矩阵,我们将不规则的树遍历转换为完全矢量化的稀疏矩阵运算,从而在硬件加速器上解锁了巨大的效率提升。我们将在一个服务于数十亿用户的大型工业视频推荐平台上部署STATIC。STATIC在最小的延迟开销(每一步0.033毫秒和0.25%的推理时间)下产生了显著的产品指标影响,相对于CPU Trie实现,其速度提升了948倍,相对于硬件加速的二分查找基线,其速度提升了47-1033倍。此外,STATIC在各种实际配置中保持了极低的运行时间开销。据我们所知,STATIC实现了严格受限生成检索的第一个生产规模部署。此外,在学术基准上的评估表明,STATIC可以显著提高生成检索的冷启动性能。我们的代码可在https://github.com/youtube/static-constraint-decoding上获得。

英文摘要:

Generative retrieval has emerged as a powerful paradigm for LLM-based recommendation. However, industrial recommender systems often benefit from restricting the output space to a constrained subset of items based on business logic (e.g. enforcing content freshness or product category), which standard autoregressive decoding cannot natively support. Moreover, existing constrained decoding methods that make use of prefix trees (Tries) incur severe latency penalties on hardware accelerators (TPUs/GPUs). In this work, we introduce STATIC (Sparse Transition Matrix-Accelerated Trie Index for Constrained Decoding), an efficient and scalable constrained decoding technique designed specifically for high-throughput LLM-based generative retrieval on TPUs/GPUs. By flattening the prefix tree into a static Compressed Sparse Row (CSR) matrix, we transform irregular tree traversals into fully vectorized sparse matrix operations, unlocking massive efficiency gains on hardware accelerators. We deploy STATIC on a large-scale industrial video recommendation platform serving billions of users. STATIC produces significant product metric impact with minimal latency overhead (0.033 ms per step and 0.25% of inference time), achieving a 948x speedup over a CPU trie implementation and a 47-1033x speedup over a hardware-accelerated binary-search baseline. Furthermore, the runtime overhead of STATIC remains extremely low across a wide range of practical configurations. To the best of our knowledge, STATIC enables the first production-scale deployment of strictly constrained generative retrieval. In addition, evaluation on academic benchmarks demonstrates that STATIC can considerably improve cold-start performance for generative retrieval. Our code is available at https://github.com/youtube/static-constraint-decoding.

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

↑