Abstract
Low Rank Adaptation (LoRA) has gained massive attention in the recent generative AI research. One of the main advantages of LoRA is its ability to be fused with pretrained models adding no overhead during inference. However, from a mobile deployment standpoint, we can either avoid inference overhead in the fused mode but lose the ability to switch adapters rapidly, or suffer significant (up to 30% higher) inference latency while enabling rapid switching in the unfused mode. LoRA also exhibits concept-loss when multiple adapters are used concurrently. In this paper, we propose Sparse High Rank Adapters (SHiRA), a new paradigm which incurs no inference overhead, enables rapid switching, and significantly reduces concept-loss. Specifically, SHiRA can be trained by directly tuning only 1-2% of the base model weights while leaving others unchanged. This results in a highly sparse adapter which can be switched directly in the fused mode. We further provide theoretical and empirical insights on how high sparsity in SHiRA can aid multi-adapter fusion by reducing concept loss. Our extensive experiments on LVMs and LLMs demonstrate that finetuning only a small fraction of the parameters in the base model is sufficient for many tasks while enabling both rapid switching and multi-adapter fusion. Finally, we provide a latency- and memory-efficient SHiRA implementation based on Parameter-Efficient Finetuning (PEFT) Library. This implementation trains at nearly the same speed as LoRA while consuming lower peak GPU memory, thus making SHiRA easy to adopt for practical use cases.
Introduction
Low-Rank Adaptation (LoRA) is the industry standard for fine-tuning Large Language Models (LLMs) and Vision Models. However, it faces a "deployment dilemma" on edge devices like smartphones. If you "fuse" LoRA weights into the base model for speed, you modify the entire weight matrix, making switching to a different adapter a slow, battery-draining process. If you keep them "unfused" to switch quickly, you suffer a 30% increase in inference latency. Furthermore, LoRA often suffers from "concept loss" when merging multiple adapters, leading to artifacts or the loss of specific styles. SHiRA addresses these issues by introducing a sparse, high-rank approach to adaptation.
Methods: Sparse High Rank Adaptation
SHiRA takes a fundamentally different approach to parameter-efficient fine-tuning. Instead of adding new low-rank matrices, it identifies a tiny subset (1–2%) of the existing weights in the base model and makes only those trainable.
This is achieved through gradient masking: during backpropagation, a sparse mask is applied to the gradients so that only the selected weights are updated. This results in a "high rank" adapter because the updates aren't forced through a narrow low-rank bottleneck. The researchers explored several masking strategies, including SHiRA-SNIP, which uses a metric combining weight magnitude and gradient information to pick the most "sensitive" parameters. For inference, you only need to store the 1–2% of changed weights and their indices, allowing for rapid switching by "scattering" these values back into the base model.
Experimental Results
The researchers validated SHiRA across a wide range of modalities, including Vision (Stable Diffusion v1.5 and SDXL) and Language (LLaMA-7B and LLaMA2-7B).
Performance and Efficiency
SHiRA-SNIP outperformed LoRA by an average of 2.7% on LLaMA-7B commonsense reasoning benchmarks. Additionally, SHiRA is more efficient during training, consuming 16% less peak GPU memory than LoRA. On a standard CPU, loading a SHiRA adapter is 5× to 16× faster than fusing a LoRA adapter, reducing switching time for a LLaMA2-7B model from ~28 seconds to ~5 seconds.
Visual Quality and Multi-Adapter Fusion
A key insight of SHiRA is that high sparsity leads to natural orthogonality. Because two sparse adapters are unlikely to have overlapping masks, they do not interfere with each other when merged. This significantly reduces the concept loss seen in LoRA.
As shown in the visual results, SHiRA successfully combines multiple concepts (e.g., generating a "knight" in a specific "painting style" with a "blue fire" effect) while LoRA often loses the style or produces artifacts like broken anatomy.
Conclusion
SHiRA provides a robust solution for deploying fine-tuned models on edge devices, offering the best of both worlds: the speed of fused inference and the flexibility of rapid adapter switching. By leveraging sparse, high-rank updates, SHiRA achieves superior performance in both language and vision tasks while mitigating the concept loss common in multi-adapter scenarios. Future work will explore hardware-software co-design to further optimize sparse kernel performance on mobile hardware.
Summary updated