在风险可控下高效部署大语言模型
Efficiently Deploying LLMs with Controlled Risk
AI总结:
本文提出具有多级弃权机制的层次链 HCMA,利用模型内在不确定性实现免训练模型切换,在 MMLU 上将 Llama3 405B 错误率降低 30%,并通过数据高效逻辑回归将 ECE 降低 50%,实现效率与风险控制的新权衡。
摘要:
在生产环境中部署大语言模型需要同时关注效率和风险控制。先前的工作已经展示了在保持相似准确率的同时削减成本的可能性,但忽略了风险控制。相比之下,本文提出了具有多级弃权(不执行)机制的层次链(HCMA),利用模型内在的不确定性沿大语言模型智能层次委派查询,仅基于黑盒 API 调用即可实现免训练模型切换。我们的框架在效率和风险之间呈现了新颖的权衡。例如,在 MMLU 上部署 HCMA 时,当允许模型对 20% 的查询弃权(不执行)时,Llama3 405B 的错误率降低了 30%。为了校准 HCMA 以获得最优性能,我们的方法使用数据高效的逻辑回归(基于简单的非线性特征变换),仅需 50 或 100 个标注样本即可实现出色的校准误差(ECE),与朴素的 Platt 缩放相比将 ECE 降低了 50%。在自由形式生成任务上,我们发现思维链对于选择性预测无效,而零样本提示在 TruthfulQA 上以高弃权率将错误率降至 0%。随着大语言模型越来越多地部署在具有不同能力的计算环境中(如移动端、笔记本电脑和云端),我们的框架为在保持部署效率的同时实施严格的风险控制铺平了道路。
英文摘要:
Deploying large language models in production requires simultaneous attention to efficiency and risk control. Prior work has shown the possibility to cut costs while maintaining similar accuracy, but has neglected to focus on risk control. By contrast, here we present hierarchical chains with multi-level abstention (HCMA), which use model-intrinsic uncertainty to delegate queries along the LLM intelligence hierarchy, enabling training-free model switching based solely on black-box API calls. Our framework presents novel trade-offs between efficiency and risk. For example, deploying HCMA on MMLU cuts the error rate of Llama3 405B by 30% when the model is allowed to abstain on 20% of the queries. To calibrate HCMA for optimal performance, our approach uses data-efficient logistic regressions (based on a simple nonlinear feature transformation), which require only 50 or 100 labeled examples to achieve excellent calibration error (ECE), cutting ECE by 50% compared to naive Platt scaling. On free-form generation tasks, we find that chain-of-thought is ineffectual for selective prediction, whereas zero-shot prompting drives error to 0% on TruthfulQA at high abstention rates. As LLMs are increasingly deployed across computing environments with different capabilities (such as mobile, laptop, and cloud), our framework paves the way towards maintaining deployment efficiency while putting in place sharp risk controls.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。