无需模型权重,仅用API查询即可合并多个大模型,提升性能。
Black-box Model Merging for Language-Model-as-a-Service with Massive Model Repositories
- 用进化算法通过API调用实现无权重模型合并
- 在多个任务上超越现有基线,性能显著提升
- 适合使用大模型API服务但无法获取权重的开发者
模型合并旨在将多个独立模型整合为一个融合各自优势的统一模型。现有方法多依赖任务向量,需访问模型参数,但如GPT-4这类超大规模语言模型通常仅以API形式提供(即语言模型即服务),用户无法获取模型权重。这带来了一个关键挑战:基于大量大模型的黑箱模型合并(BMM)。为此,我们提出一种无导数优化框架Evo-Merging,仅通过推理时API查询实现有效合并。该方法包含两个核心组件:(1) 基于稀疏性的去噪机制,用于识别并过滤模型间的无关或冗余信息;(2) 信号感知缩放策略,根据模型表现动态计算最优组合权重。我们还对非对称稀疏化提供了形式化论证与理论分析。大量实验表明,本方法在多种任务上达到领先水平,显著优于现有强基线。
原文摘要 · Abstract (English)
Model merging refers to the process of integrating multiple distinct models into a unified model that preserves and combines the strengths and capabilities of the individual models. Most existing approaches rely on task vectors to combine models, typically under the assumption that model parameters are accessible. However, for extremely large language models (LLMs) such as GPT-4, which are often provided solely as black-box services through API interfaces (Language-Model-as-a-Service), model weights are not available to end users. This presents a significant challenge, which we refer to as black-box model merging (BMM) with massive LLMs. To address this challenge, we propose a derivative-free optimization framework based on the evolutionary algorithm (Evo-Merging) that enables effective model merging using only inference-time API queries. Our method consists of two key components: (1) sparsity-based denoising, designed to identify and filter out irrelevant or redundant information across models, and (2) sign-aware scaling, which dynamically computes optimal combination weights for the relevant models based on their performance. We also provide a formal justification, along with a theoretical analysis, for our asymmetric sparsification. Extensive experimental evaluations demonstrate that our approach achieves state-of-the-art results on a range of tasks, significantly outperforming existing strong baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。