Salvation Lies Within: Proactive Prefix Re-forming for LLM-based Tagging
Abstract
Industrial personalized recommendation adopts LLMs for offline intent tagging (e.g., user interests from the history), where each user corresponds to one prompt. While shared prefix among prompts can improve inference efficiency, the reusable part is actually dwarfed by user-specific records. We observe that even a slight $\textit{discordance}$ in preceding records actually prevents two prompts from sharing a longer prefix, revealing an opportunity to proactively re-form the common part from within, by adjusting the internal orders. Realizing this at industrial scale is challenging: 1) the data preparation and inference are performed separately; 2) re-forming must be completed within minutes for massive prompts under strict SLO; and 3) user data evolves continuously, requiring additional updates. We present $\textit{PrefixShakeup}$, a system that enables $\textit{proactive prefix re-forming}$ before actual inference, during the dataset preparation, intrinsically enlarging the common part from the source. It combines three techniques: 1\) a prefix model that tolerates a bounded number of records to be changed, instead of requiring the strict prefix matching; 2\) an alleviator that reorders the records per prompt and further reorders the prompt positions to maximize the reuse, given limited HBM, upon the kernel-based acceleration for scoring the similarity; and 3\) an adaptor that supports incremental changes over time via lightweight management and necessary caching to avoid full re-computation. We implement PrefixShakeup on Ascend NPUs and evaluate it in the mirror environment. Compared to state-of-the-art inference, PrefixShakeup improves throughput by up to 2.1$\times$, with controlled tagging accuracy.
BibTeX
@inproceedings{wang2026salvation,
author = {Shulan Wang and YingJie Zhu and Yuting Yan and Ke Cheng and Yan Chen and Sheng Zhang and Hefei Guo and Qidong Zhang and Zhengyong Zhang and Yibo Jin and Zhuzhong Qian},
title = {{Salvation Lies Within: Proactive Prefix Re-forming for LLM-based Tagging}},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
url = {https://openreview.net/forum?id=PoQNrAiH0j},
}Ask Althea to put this paper to the test.
Loading related content...