让小模型更聪明地决定何时自己处理、何时交给大模型,节省资源。
Gatekeeper: Improving Model Cascades Through Confidence Tuning
- 设计新损失函数,让小模型学会自信判断能否独立完成任务。
- 在图像分类等任务中,减少无效调用大模型次数,提升效率。
- 无需改模型结构,适配多种任务和模型架构,实用性强。
大规模机器学习模型虽性能强大,但计算成本高昂。为缓解此问题,常部署小型本地模型与大型模型协同,通过路由和转接机制将复杂任务交由大模型处理。然而现有方法难以平衡二者能力,导致频繁不必要地调用大模型或资源利用不佳。本文提出名为 Gatekeeper 的新型损失函数,用于校准小模型在级联架构中的表现。该方法微调小模型,使其对能正确处理的任务具备信心,而对复杂任务主动转接至大模型。同时引入机制控制性能与转接准确性的权衡,且无需修改模型结构,适用于编码器-仅、解码器-仅及编码器-解码器等多种架构。在图像分类、语言建模及视觉-语言任务上的实验表明,本方法显著提升了转接性能。
原文摘要 · Abstract (English)
Large-scale machine learning models deliver strong performance across a wide range of tasks but come with significant computational and resource constraints. To mitigate these challenges, local smaller models are often deployed alongside larger models, relying on routing and deferral mechanisms to offload complex tasks. However, existing approaches inadequately balance the capabilities of these models, often resulting in unnecessary deferrals or sub-optimal resource usage. In this work we introduce a novel loss function called Gatekeeper for calibrating smaller models in cascade setups. Our approach fine-tunes the smaller model to confidently handle tasks it can perform correctly while deferring complex tasks to the larger model. Moreover, it incorporates a mechanism for managing the trade-off between model performance and deferral accuracy, and is broadly applicable across various tasks and domains without any architectural changes. We evaluate our method on encoder-only, decoder-only, and encoder-decoder architectures. Experiments across image classification, language modeling, and vision-language tasks show that our approach substantially improves deferral performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。