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

BBox-Adapter:黑盒大语言模型的轻量级适配

BBox-Adapter: Lightweight Adapting for Black-Box Large Language Models

Georgia Tech(佐治亚理工学院);Accenture(埃森哲公司)

Haotian Sun, Yuchen Zhuang, Wei Wei, Chao Zhang, Bo Dai

AI总结:

针对黑盒大语言模型无法微调的问题,提出轻量级适配器BBox-Adapter,通过排序NCE损失和在线反馈机制提升性能,最高提升6.77%,并大幅降低成本。

摘要:

将最先进的大语言模型(如GPT-4和Gemini)适配到特定任务具有挑战性。由于这些模型在参数、嵌入甚至输出概率上的不透明性,现有的微调适配方法无法适用。因此,适配这些黑盒大语言模型只能通过其API服务进行,这引发了关于透明度、隐私和成本的问题。为解决这些挑战,我们引入了BBox-Adapter,一种用于黑盒大语言模型的新型轻量级适配器。BBox-Adapter通过将目标数据视为正样本、源数据视为负样本来区分目标域和源域数据。它采用基于排序的噪声对比估计(NCE)损失来提升目标域数据的可能性,同时惩罚源域数据。此外,它还具有在线适配机制,该机制结合了从真实标签、人类或AI反馈中实时采样的正数据,以及来自先前适配的负数据。大量实验证明了BBox-Adapter的有效性和成本效率。它在不同任务和领域上将模型性能提升了高达6.77%,同时将训练和推理成本分别降低了31.30倍和1.84倍。

英文摘要:

Adapting state-of-the-art Large Language Models (LLMs) like GPT-4 and Gemini for specific tasks is challenging. Due to the opacity in their parameters, embeddings, and even output probabilities, existing fine-tuning adaptation methods are inapplicable. Consequently, adapting these black-box LLMs is only possible through their API services, raising concerns about transparency, privacy, and cost. To address these challenges, we introduce BBox-Adapter, a novel lightweight adapter for black-box LLMs. BBox-Adapter distinguishes target and source domain data by treating target data as positive and source data as negative. It employs a ranking-based Noise Contrastive Estimation (NCE) loss to promote the likelihood of target domain data while penalizing that of the source domain. Furthermore, it features an online adaptation mechanism, which incorporates real-time positive data sampling from ground-truth, human, or AI feedback, coupled with negative data from previous adaptations. Extensive experiments demonstrate BBox-Adapter's effectiveness and cost efficiency. It improves model performance by up to 6.77% across diverse tasks and domains, while reducing training and inference costs by 31.30x and 1.84x, respectively.

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

↑