Merging LoRAs like Playing LEGO: Pushing the Modularity of LoRA to Extremes Through Rank-Wise Clustering

要約

低ランク適応 (LoRA) は、そのモジュラー設計と Huggingface などのプラットフォームで広く利用できるため、大規模言語モデル (LLM) をさまざまなドメインに合わせて微調整するための一般的な手法として浮上しています。
このモジュール性により、複数の LoRA を組み合わせて LLM 機能を強化することへの関心が高まりました。
ただし、LoRA を構成するための既存の方法は、追加のトレーニングを必要とするタスク固有の適応に主に焦点を当てており、現在のモデル結合技術では LoRA のモジュール性を十分に活用できないことが多く、パラメーターの干渉やパフォーマンスの低下につながります。
この論文では、レゴ ブロックを組み立てるのと同様に、より細かい粒度で複数の LoRA を分解および再組み立てする実現可能性を調査します。
LoRA の各ランクに対応するパラメータが独立したユニットとして機能する、最小セマンティック ユニット (MSU) の概念を導入します。
これらの MSU は、順列不変性と連結合計の等価性プロパティを実証し、柔軟な組み合わせで新しい LoRA を作成できるようにします。
これらの洞察に基づいて、私たちは LoRA-LEGO フレームワークを提案します。
このフレームワークは、さまざまな LoRA の MSU を $k$ クラスターにグループ化することにより、ランクごとのパラメーター クラスタリングを実行します。
各クラスターの重心は代表的な MSU として機能し、$k$ の調整されたランクを持つマージされた LoRA のアセンブリを可能にします。
さらに、二重の再重み付け戦略を適用して、マージされた LoRA の規模を最適化します。
さまざまなベンチマークにわたる実験により、私たちの方法が LoRA マージにおける既存のアプローチよりも優れていることが実証されました。

要約(オリジナル)

Low-Rank Adaptation (LoRA) has emerged as a popular technique for fine-tuning large language models (LLMs) to various domains due to its modular design and widespread availability on platforms like Huggingface. This modularity has sparked interest in combining multiple LoRAs to enhance LLM capabilities. However, existing methods for LoRA composition primarily focus on task-specific adaptations that require additional training, and current model merging techniques often fail to fully leverage LoRA’s modular nature, leading to parameter interference and performance degradation. In this paper, we investigate the feasibility of disassembling and reassembling multiple LoRAs at a finer granularity, analogous to assembling LEGO blocks. We introduce the concept of Minimal Semantic Units (MSUs), where the parameters corresponding to each rank in LoRA function as independent units. These MSUs demonstrate permutation invariance and concatenation-summation equivalence properties, enabling flexible combinations to create new LoRAs. Building on these insights, we propose the LoRA-LEGO framework. This framework conducts rank-wise parameter clustering by grouping MSUs from different LoRAs into $k$ clusters. The centroid of each cluster serves as a representative MSU, enabling the assembly of a merged LoRA with an adjusted rank of $k$. Additionally, we apply a dual reweighting strategy to optimize the scale of the merged LoRA. Experiments across various benchmarks demonstrate that our method outperforms existing approaches in LoRA merging.

arxiv情報

著者 Ziyu Zhao,Tao Shen,Didi Zhu,Zexi Li,Jing Su,Xuwu Wang,Kun Kuang,Fei Wu
発行日 2024-09-24 15:08:41+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG パーマリンク