别让我停下:单次迭代检测样板响应
Do Stop Me Now: Detecting Boilerplate Responses with a Single Iteration
AI总结:
提出利用首个生成令牌的对数概率分布,通过轻量级k-NN分类器在单步生成后检测样板响应,实现提前终止或重定向至小模型,以优化LLM推理并节省计算成本。
摘要:
大型语言模型(LLMs)在生成样板响应(如拒绝、简单确认和随意问候)时,常常消耗大量计算资源,这增加了不必要的成本和延迟。为解决这一低效问题,我们提出了一种简单但高效的方法,仅在一次生成步骤后即可检测此类响应。我们证明,第一个生成令牌的对数概率分布可作为分类整个后续响应性质的有力信号。我们在涵盖小型、大型及推理专用模型的多样化模型集上进行的实验表明,不同响应类型的首令牌对数概率向量形成明显可分离的簇。使用轻量级k近邻(k-NN)分类器,我们在预测响应是否为实质性回答或某种形式的样板响应(包括用户指定的拒绝)方面实现了高准确率。其主要意义在于提供一种计算上微不足道的实用技术,通过实现提前终止或将请求重定向至较小模型来优化LLM推理,从而大幅节省计算成本。这项工作为更高效、可持续的LLM部署提供了一条直接路径。
英文摘要:
Large Language Models (LLMs) often expend significant computational resources generating boilerplate responses, such as refusals, simple acknowledgements and casual greetings, which adds unnecessary cost and latency. To address this inefficiency, we propose a simple yet highly effective method for detecting such responses after only a single generation step. We demonstrate that the log-probability distribution of the first generated token serves as a powerful signal for classifying the nature of the entire subsequent response. Our experiments, conducted across a diverse range of small, large, and reasoning-specialized models, show that the first-token log-probability vectors form distinctly separable clusters for different response types. Using a lightweight k-NN classifier, we achieve high accuracy in predicting whether a response will be a substantive answer or a form of boilerplate response, including user-specified refusals. The primary implication is a practical, computationally trivial technique, optimizing LLM inference by enabling early termination or redirection to a smaller model, thereby yielding significant savings in computational cost. This work presents a direct path toward more efficient and sustainable LLM deployment.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。