Abstract
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.
Introduction
As Large Language Models (LLMs) continue to grow in size, fine-tuning them for specialized tasks becomes increasingly resource-intensive. Low-Rank Adaptation (LoRA) has emerged as a popular solution, reducing trainable parameters by introducing small matrices ($A$ and $B$) to approximate weight updates. However, serving thousands of customized LoRA adapters simultaneously still leads to a "memory wall." For example, hosting 10,000 customized Llama-2-70B models would require over 3.3 TB of GPU memory just for the adapter weights.
To address this, researchers have explored parameter sharing. However, simple "pure sharing"—where identical weights are used across different layers—often results in significant performance degradation. The challenge lies in balancing parameter reduction through sharing with the "differentiation" required for layers to learn distinct, complex representations.
Methodology
The core insight behind Mixture of Shards (MoS) is that while weights can be shared, the combinations of those weights must remain unique across layers to maintain performance.
MoS moves away from treating low-rank matrices as monolithic blocks. Instead, it decomposes them into smaller "shards" stored in a global pool. The architecture employs four key differentiation strategies:
- Global Sharing & Subset Selection: All layers draw from a global pool of shards. A Mixture-of-Experts (MoE)-like routing mechanism selects a specific subset of shards for each layer to construct its local matrices.
- Pair Dissociation: Unlike standard LoRA, which pairs vectors in $A$ and $B$, MoS decouples them. This allows independent mixing and matching from separate $A$ and $B$ pools, exponentially increasing combinatorial diversity.
- Vector Sharding: Vectors are further divided into sub-vectors (shards). A single rank in the LoRA matrix is formed by concatenating multiple shards, maximizing the variety of weight combinations.
- Shard Privatization: To prevent layers from becoming too similar, a portion of shards is reserved as "private" for specific blocks, while the rest are "public" and shared globally.
Experimental Setup
The authors evaluated MoS using LLaMA2 (7B, 13B) and LLaMA3.2 (3B) base models across several benchmarks:
- Factual Knowledge & Reasoning: MMLU, BBH, and GSM8K.
- Multilinguality: TyDi QA.
- Coding: HumanEval (fine-tuned on CodeAlpaca).
- Instruction Following: Super-Natural Instructions (SuperNI) and Flan V2.
Results and Discussion
MoS demonstrates a significant leap in parameter efficiency. In standard settings, MoS achieved performance parity with a LoRA model of rank 64 while using only the parameter count of a rank 8 model—an 8× efficiency gain.
On the LLaMA2-7B benchmark, MoS achieved an average score of 37.63, outperforming standard LoRA (37.53) and other sharing methods like VeRA and PRoLoRA, despite using fewer parameters. The method's scalability was also confirmed, with consistent benefits observed as model size increased from 3B to 13B parameters.
The success of MoS highlights that "combinatorial diversity" is a powerful tool for parameter efficiency. By dissociating pairs and sharding vectors, the model can simulate high-rank updates using a very small pool of underlying trainable parameters.
Conclusion
MoS offers a robust framework for highly parameter-efficient fine-tuning, enabling the deployment of more customized LLMs on limited hardware. While it introduces a minor training overhead (approx. 2.8% increase in time), the massive savings in serving memory make it a compelling choice for large-scale deployments. Future work may explore applying this dissociated shard perspective to multi-task learning environments.
Summary updated