让大模型在弱设备上高效运行,兼顾隐私与性能。
Efficient Deployment of Large Language Models on Resource-constrained Devices
- 结合参数高效微调与结构化剪枝,动态压缩模型规模。
- 在80台设备上实现1.4到6.9倍的微调加速,准确率提升0.4%~4.5%。
- 自适应调节剪枝率与LoRA秩,适合异构设备部署。
在资源受限设备上部署大语言模型面临计算资源不足与数据分布异构的双重挑战。为解决数据隐私问题,需利用设备端私有数据对大模型进行微调。尽管联邦学习(FL)提供了隐私保护方案,但现有方法仍保留原始模型规模,导致推理延迟高、内存占用大。为此,我们提出FedSpine框架,将参数高效微调(PEFT)与结构化剪枝相结合,实现大模型在资源受限设备上的高效部署。具体地,设计了迭代剪枝与参数调优流程,并引入在线多臂赌博机(MAB)算法,根据设备实际能力自适应调整剪枝比例与LoRA秩,无需预先了解设备性能。实验在包含80台设备的真实平台中进行,结果表明,相较于基线方法,在相同稀疏度下,FedSpine可实现1.4×–6.9×的微调加速,最终准确率提升0.4%–4.5%。
原文摘要 · Abstract (English)
Deploying Large Language Models (LLMs) on resource-constrained (or weak) devices presents significant challenges due to limited resources and heterogeneous data distribution. To address the data concern, it is necessary to fine-tune LLMs using on-device private data for various downstream tasks. While Federated Learning (FL) offers a promising privacy-preserving solution, existing fine-tuning methods retain the original LLM size, leaving issues of high inference latency and excessive memory demands unresolved. Hence, we design FedSpine, an FL framework that combines Parameter- Efficient Fine-Tuning (PEFT) with structured pruning for efficient deployment of LLMs on resource-constrained devices. Specifically, FedSpine introduces an iterative process to prune and tune the parameters of LLMs. To mitigate the impact of device heterogeneity, an online Multi-Armed Bandit (MAB) algorithm is employed to adaptively determine different pruning ratios and LoRA ranks for heterogeneous devices without any prior knowledge of their computing and communication capabilities. As a result, FedSpine maintains higher inference accuracy while improving fine-tuning efficiency. Experimental results conducted on a physical platform with 80 devices demonstrate that FedSpine can speed up fine-tuning by 1.4$\times$-6.9$\times$ and improve final accuracy by 0.4%-4.5% under the same sparsity level compared to other baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。