MoS通过分片混合机制,实现8倍参数效率提升。
MoS: Unleashing Parameter Efficiency of Low-Rank Adaptation with Mixture of Shards
- 采用分片混合与专家路由,动态组合低秩矩阵
- 在标准LoRA上实现约8倍参数压缩
- 适合资源受限场景下的高效微调
大语言模型的快速扩展要求更轻量的微调方法,以缓解大量定制模型并行服务时爆炸式的显存开销。针对更高效的低秩适配(LoRA),参数共享具有潜力。实证研究揭示差异化对逆转纯共享负面影响至关重要。基于此,我们提出分片混合(MoS),融合层间与层内共享策略,并集成四种几乎零成本的差异化方法:子集选择、成对分离、向量分片与分片私有化。简言之,其通过类似MoE的路由机制从全局池中选取指定数量的分片,再顺序拼接至低秩矩阵。该方法在保持LoRA全部优势的同时,显著提升参数效率,并有效规避同类共享方法的缺陷。实验表明,在标准LoRA设置下实现约8倍参数节省。消融实验验证了各组件的重要性。对参数共享的洞见及MoS方法,可为未来更高效的微调方法提供启示。代码已公开于https://github.com/Forence1999/MoS。
原文摘要 · Abstract (English)
The rapid scaling of large language models necessitates more lightweight finetuning methods to reduce the explosive GPU memory overhead when numerous customized models are served simultaneously. Targeting more parameter-efficient low-rank adaptation (LoRA), parameter sharing presents a promising solution. Empirically, our research into high-level sharing principles highlights the indispensable role of differentiation in reversing the detrimental effects of pure sharing. Guided by this finding, we propose Mixture of Shards (MoS), incorporating both inter-layer and intra-layer sharing schemes, and integrating four nearly cost-free differentiation strategies, namely subset selection, pair dissociation, vector sharding, and shard privatization. Briefly, it selects a designated number of shards from global pools with a Mixture-of-Experts (MoE)-like routing mechanism before sequentially concatenating them to low-rank matrices. Hence, it retains all the advantages of LoRA while offering enhanced parameter efficiency, and effectively circumvents the drawbacks of peer parameter-sharing methods. Our empirical experiments demonstrate approximately 8x parameter savings in a standard LoRA setting. The ablation study confirms the significance of each component. Our insights into parameter sharing and MoS method may illuminate future developments of more parameter-efficient finetuning methods. The code is officially available at https://github.com/Forence1999/MoS.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。