让多个模型适配器共享同一基模型,高效实现多任务微调与推理。
Symbiosis: Multi-Adapter Inference and Fine-Tuning
- 基模型与适配器分拆执行,支持多适配器并行运行。
- 8张GPU同时微调20个Gemma2-27B适配器,显存占用降低90%以上。
- 兼容主流模型库,支持不同微调方法混合部署,适合云服务场景。
参数高效微调(PEFT)将任务特定参数压缩至小型适配器,显著降低存储开销。然而现有框架在多适配器场景下存在诸多限制:微调时需为每个任务部署独立基模型实例,导致显存浪费与利用率低;推理平台虽支持多适配器,但无法独立管理资源或混合使用不同PEFT方法;难以利用异构加速器;且缺乏对用户私有适配参数的保护。Symbiosis通过将基模型以服务形式部署,实现其层间共享,采用分片执行技术将客户端适配器与冻结基模型解耦,使各任务可自主管理资源、选择微调方法并达成性能目标。该方案对模型透明,可开箱即用支持Transformers库中多数模型。我们验证了在8张GPU上同时微调20个Gemma2-27B适配器的可行性。
原文摘要 · Abstract (English)
Parameter-efficient fine-tuning (PEFT) allows model builders to capture the task-specific parameters into adapters, which are a fraction of the size of the original base model. Popularity of PEFT technique for fine-tuning has led to the creation of a large number of adapters for popular Large Language Models (LLMs). However, existing frameworks fall short in supporting inference or fine-tuning with multiple adapters in the following ways. 1) For fine-tuning, each job needs to deploy its dedicated base model instance, which results in excessive GPU memory consumption and poor GPU utilization. 2) While popular inference platforms can serve multiple PEFT adapters, they do not allow independent resource management or mixing of different PEFT methods. 3) They cannot make effective use of heterogeneous accelerators. 4) They do not provide privacy to users who may not wish to expose their fine-tuned parameters to service providers. In Symbiosis, we address the above problems by enabling the as-a-service deployment of the base model. The base model layers can be shared across multiple inference or fine-tuning processes. Our split-execution technique decouples the execution of client-specific adapters and layers from the frozen base model layers offering them flexibility to manage their resources, to select their fine-tuning method, to achieve their performance goals. Our approach is transparent to models and works out-of-the-box for most models in the transformers library. We demonstrate the use of Symbiosis to simultaneously fine-tune 20 Gemma2-27B adapters on 8 GPUs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。