[Paper Review] Data-driven Clustering and Merging of Adapters for On-device Large Language Models
The paper presents D^2C, an iterative data-driven clustering algorithm that groups LoRA adapters for on-device LLMs and merges them within clusters to create multi-task adapters under strict storage limits.
On-device large language models commonly employ task-specific adapters (e.g., LoRAs) to deliver strong performance on downstream tasks. While storing all available adapters is impractical due to memory constraints, mobile devices typically have sufficient capacity to store a limited number of these parameters. This raises a critical challenge: how to select representative adapters that generalize well across multiple tasks - a problem that remains unexplored in existing literature. We propose a novel method D2C for adapter clustering that leverages minimal task-specific examples (e.g., 10 per task) and employs an iterative optimization process to refine cluster assignments. The adapters within each cluster are merged, creating multi-task adapters deployable on resource-constrained devices. Experimental results demonstrate that our method effectively boosts performance for considered storage budgets.
Motivation & Objective
- Address storage constraints on mobile devices by selecting a representative, generalizable set of adapters from many single-task LoRAs.
- Automatically cluster LoRAs using few task-specific examples to enable effective merging.
- Produce K multi-task adapters by merging adapters within each cluster while maintaining performance.
- Demonstrate that D^2C outperforms random and standard clustering under realistic on-device storage budgets.
Proposed method
- Partition N LoRAs into K clusters via a partition map θ; clusters are merged using existing merging techniques (e.g., TIES).
- Iteratively improve clustering by sampling cluster pairs and a LoRA, evaluating merged performance on task-specific small datasets, and moving LoRAs between clusters based on loss reduction.
- Use a few task examples (e.g., n=10) to evaluate merges and guide clustering, without retraining base models.
- After T iterations, finalize clustering and merge LoRAs within each cluster to obtain K multi-task LoRAs.
- Baseline comparisons include random clustering, K-Means on flattened LoRA parameters, and K-Means on SVD features.
- Merging technique: TIES with unary weights and 0.5 density factor; evaluation uses cross-entropy loss on task data.
Experimental results
Research questions
- RQ1Can a data-driven clustering approach with few-shot task data effectively group LoRAs for merging on-device?
- RQ2How does D^2C compare to random clustering and standard clustering methods under fixed storage budgets?
- RQ3Does clustering by task yield better multi-task adapters than clustering by language or random partitions?
- RQ4What is the impact of the number of clusters and the number of per-task examples on performance?
- RQ5Is the method robust to different merging strategies beyond TIES?
Key findings
- D^2C outperforms random clustering by approximately 2.1–4.5% on average across tested models and tasks.
- With 12.5% storage (K=5 of 40 LoRAs), D^2C achieves higher average scores (26.0% for Llama 3.2 3B, 24.6% for Qwen 2.5 1.5B, 17.3% for StableLM 2 1.6B) than single-task LoRAs or zero-shot baselines.
- K-Means variants perform similarly to random clustering and are outperformed by D^2C on average.
- Identified clusters tend to align with tasks, and higher homogeneity within clusters (task-focused) yields stronger performance; clustering by language is less beneficial.
- The approach is robust to the number of task examples and to the merging strategy, still improving over baselines across settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.