arXiv:2410.02173cs.LGcs.AI2024-10被引 5

通过智能分级与分层拒答,实现大模型高效部署同时降低风险。

Efficiently Deploying LLMs with Controlled Risk

  • 基于模型内在不确定性,按智能层级动态分配任务,无需训练即可切换模型。
  • 在MMLU上允许20%拒答时,将Llama3 405B错误率降低30%。
  • 仅需50~100个样本即可精准校准,适合资源受限场景的快速部署。

将大语言模型投入生产需兼顾效率与风险控制。现有工作虽能降低成本并保持精度,却忽视风险管控。本文提出分层拒答链(HCMA),利用模型内在不确定性沿大模型智能层级委派查询,实现仅依赖黑盒API调用的免训练模型切换。该框架在效率与风险间建立新权衡:在MMLU上,当允许20%查询拒答时,可使Llama3 405B的错误率下降30%。为优化性能,采用数据高效的逻辑回归(基于简单非线性特征变换),仅需50或100个标注样本即达到优异校准误差(ECE),相比朴素Platt缩放降低50%。在自由生成任务中,思维链提示无效,而零样本提示在高拒答率下可使TruthfulQA错误率降至0%。随着大模型在移动、笔记本与云环境中的广泛应用,本框架为实现高效部署与精准风险控制提供了可行路径。

原文摘要 · Abstract (English)

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.

大模型部署风险控制智能分级高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。