arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.22132cs.LG
收藏

为提示付费,而非答案:用于高效推断的LLM牧师

Pay for Hints, Not Answers: LLM Shepherding for Cost-Efficient Inference

Department of Computer Science, University of Victoria, Victoria, Canada(维多利亚大学计算机科学系);Department Of Information Technology, Manipal University, Manipal, India(马那尔大学信息科技系)

Ziming Dong, Hardik Sharma, Evan O'Toole, Jaya Prakash Champati, Kui Wu

AI总结:

LLM牧师通过请求LLM的短提示来提高SLM的准确性,显著降低推断成本,同时保持准确性。

摘要:

大型语言模型(LLMs)在复杂推理任务上表现出最先进的性能,但其推断成本限制了大规模部署。小型语言模型(SLMs)提供了显著的成本节省,但在准确性上却大幅落后。现有方法——路由和级联——将LLM视为一种全部或 nothing 的资源:要么查询完全绕过LLM,要么LLM生成完整的响应并支付全部成本。我们引入了LLM牧师,一种框架,它只请求LLM的短前缀(提示)并将其提供给SLM。这种简单的机制在数学和编码任务中出人意料地有效:即使提示仅包含LLM完整响应的10-30%,也能显著提高SLM的准确性。牧师既推广了路由和级联,又在oracle决策下实现了更低的成本。我们开发了一个两阶段预测器,共同确定是否需要提示以及请求多少个token。在广泛使用的数学推理(GSM8K,CNK12)和代码生成(HumanEval,MBPP)基准上,牧师将成本降低了42-94%,相对于仅LLM推断。与最先进的路由和级联基线相比,牧师在保持准确性的同时,实现了高达2.8倍的成本降低。据我们所知,这是首次利用token级预算控制来实现SLM-LLM协作的工作。

英文摘要:

Large Language Models (LLMs) deliver state-of-the-art performance on complex reasoning tasks, but their inference costs limit deployment at scale. Small Language Models (SLMs) offer dramatic cost savings yet lag substantially in accuracy. Existing approaches - routing and cascading - treat the LLM as an all-or-nothing resource: either the query bypasses the LLM entirely, or the LLM generates a complete response at full cost. We introduce LLM Shepherding, a framework that requests only a short prefix (a hint) from the LLM and provides it to SLM. This simple mechanism is surprisingly effective for math and coding tasks: even hints comprising 10-30% of the full LLM response improve SLM accuracy significantly. Shepherding generalizes both routing and cascading, and it achieves lower cost under oracle decision-making. We develop a two-stage predictor that jointly determines whether a hint is needed and how many tokens to request. On the widely-used mathematical reasoning (GSM8K, CNK12) and code generation (HumanEval, MBPP) benchmarks, Shepherding reduces costs by 42-94% relative to LLM-only inference. Compared to state-of-the-art routing and cascading baselines, shepherding delivers up to 2.8x cost reduction while matching accuracy. To our knowledge, this is the first work to exploit token-level budget control for SLM-LLM collaboration.

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

↑