Reproduce “LoRA-Switch: Boosting the Efficiency of Dynamic LLM Adapters via System-Algorithm Co-design” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Rui Kong, Qiyang Li, Xinyu Fang, Qingtian Feng, Qingfeng He, Yazhu Dong, Weijun Wang, Yuanchun Li and 2 more

LoRA-Switch, developed by researchers from Shanghai Jiao Tong University, Tsinghua University, and others, optimizes dynamic LoRA adapters for large language models through system-algorithm co-design. It achieves a 2.7x speedup in decoding latency compared to prior dynamic adapter methods, bringing its overhead to only 29% above a base LLM, while maintaining comparable or superior accuracy across general and domain-specific tasks.

Key insights

  • The primary bottleneck for dynamic adapters is not computational complexity but the overhead of numerous, small CUDA kernel launches, which underutilize GPU resources.
  • A token-wise pre-gated architecture for dynamic adapters enables efficient system-level optimizations by making the set of active adapters static per token, allowing for fused operations.
  • System-algorithm co-design, specifically developing a specialized CUDA kernel (SGMM) for adapter switching, can drastically reduce inference latency by consolidating fragmented operations into a single, optimized kernel.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.