ChatPaper.aiChatPaper

Vectorisatie van de Trie: Efficiënt Beperkt Decoderen voor op LLM Gebaseerde Generatieve Retrieval op Accelerators

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

February 26, 2026
Auteurs: 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
cs.AI

Samenvatting

Generatieve retrieval is opgekomen als een krachtig paradigma voor op grote taalmodellen gebaseerde aanbevelingen. Industriële aanbevelsystemen hebben echter vaak baat bij het beperken van de uitvoerruimte tot een afgebakende subset van items op basis van bedrijfslogica (bijvoorbeeld het afdwingen van contentfreshness of productcategorieën), wat standaard autoregressieve decodering niet inherent ondersteunt. Bovendien leiden bestaande constrained decoding-methoden die gebruikmaken van prefixbomen (tries) tot ernstige latentiestraf op hardwareversnellers (TPU's/GPU's). In dit werk introduceren we STATIC (Sparse Transition Matrix-Accelerated Trie Index for Constrained Decoding), een efficiënte en schaalbare constrained decoding-techniek die specifiek is ontworpen voor hoogwaardige op grote taalmodellen gebaseerde generatieve retrieval op TPU's/GPU's. Door de prefixboom af te vlakken naar een statische Compressed Sparse Row (CSR)-matrix, transformeren we onregelmatige boomtraversals naar volledig gevectoriseerde sparse matrixoperaties, wat enorme efficiëntiewinsten op hardwareversnellers mogelijk maakt. We implementeren STATIC op een grootschalig industrieel videoplatform voor aanbevelingen dat miljarden gebruikers bedient. STATIC levert significante productmetriekimpact op met minimale latentie-overhead (0,033 ms per stap en 0,25% van de inferentietijd), wat een 948x snelheidswinst oplevert ten opzichte van een CPU-trie-implementatie en een 47-1033x snelheidswinst ten opzichte van een hardwareversnelde binary-search-basislijn. Bovendien blijft de runtime-overhead van STATIC extreem laag over een breed scala aan praktische configuraties. Voor zover wij weten, maakt STATIC de eerste productie-schaal implementatie van strikt constrained generatieve retrieval mogelijk. Daarnaast toont evaluatie op academische benchmarks aan dat STATIC de cold-start-prestaties voor generatieve retrieval aanzienlijk kan verbeteren. Onze code is beschikbaar op https://github.com/youtube/static-constraint-decoding.
English
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.
PDF31March 7, 2026