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

通过预算约束策略学习实现高效上下文LLM级联

Efficient Contextual LLM Cascades through Budget-Constrained Policy Learning

University of Michigan(密歇根大学);Carnegie Mellon University(卡内基梅隆大学)

Xuechen Zhang, Zijian Huang, Ege Onur Taga, Carlee Joe-Wong, Samet Oymak, Jiasi Chen

AI总结:

本文提出强化学习策略TREACLE,在预算和延迟约束下联合选择LLM与提示方案,利用问题上下文和响应历史决策,在多个推理数据集上实现高达85%的成本节省并保持高准确率。

摘要:

自然语言处理领域的近期成功导致多个提供商推出大量大语言模型(LLMs)。每种LLM产品具有不同的推理准确率、货币成本和延迟,且其准确率进一步取决于问题的具体措辞(即特定提示)。与此同时,用户通常对回答所有问题的货币预算和延迟有限制,并且他们不知道针对每个问题应选择哪些LLM以满足其准确率和长期预算要求。为了在这一丰富的设计空间中导航,我们提出TREACLE(Thrifty Reasoning via Context-Aware LLM and Prompt Selection,通过上下文感知LLM和提示选择的节俭推理),这是一种强化学习策略,在尊重用户货币成本和延迟约束的同时联合选择模型和提示方案。TREACLE利用问题上下文,包括问题文本嵌入(反映查询的类型或难度)和响应历史(反映先前响应的一致性)来做出智能决策。我们在标准推理数据集(GSM8K、CSQA和LLC)上使用各种LLM和提示进行的评估表明,与基线相比,TREACLE可实现高达85%的成本节省,同时保持高准确率。重要的是,它使用户能够优雅地在准确率与成本之间进行权衡。

英文摘要:

Recent successes in natural language processing have led to the proliferation of large language models (LLMs) by multiple providers. Each LLM offering has different inference accuracy, monetary cost, and latency, and their accuracy further depends on the exact wording of the question (i.e., the specific prompt). At the same time, users often have a limit on monetary budget and latency to answer all their questions, and they do not know which LLMs to choose for each question to meet their accuracy and long term budget requirements. To navigate this rich design space, we propose TREACLE ($\underline{T}$hrifty $\underline{Rea}$soning via $\underline{C}$ontext-Aware $\underline{L}$LM and Prompt S$\underline{e}$lection), a reinforcement learning policy that jointly selects the model and prompting scheme while respecting the user's monetary cost and latency constraints. TREACLE uses the problem context, including question text embeddings (reflecting the type or difficulty of a query) and the response history (reflecting the consistency of previous responses) to make smart decisions. Our evaluations on standard reasoning datasets (GSM8K, CSQA, and LLC) with various LLMs and prompts show that TREACLE enables cost savings of up to 85% compared to baselines, while maintaining high accuracy. Importantly, it provides the user with the ability to gracefully trade off accuracy for cost.

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

↑