[论文解读] Efficient Deployment of Large Language Models on Resource-constrained Devices
FedSpine 是一种联邦微调框架,将结构化剪枝与 PEFT(LoRA)结合,并通过多臂带目信息驱动的自适应策略,在异构设备上高效部署端上 LLM。
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$ imes$-6.9$ imes$ and improve final accuracy by 0.4%-4.5% under the same sparsity level compared to other baselines.
研究动机与目标
- 通过在端上微调来处理来自终端数据的数据分布漂移,同时保护隐私。
- 降低推理延迟和内存使用,以便在资源受限设备上部署 LLM。
- 开发一个自适应、隐私保护的框架,处理联邦微调过程中的设备异质性。
- 将结构化剪枝与 PEFT 结合,以在提高微调效率的同时保持准确性。
提出的方法
- 提出 FedSpine,一种在轮次中迭代剪除冻结的 LLM 并进行 LoRA 调参的联邦学习框架。
- 使用结构化剪枝来去除权重组(注意力头和 FFN 通道),由基于 LoRA 的重要性标准引导。
- 采用多臂带目信息在线学习算法(平滑上置信界,S-UCB)在没有先验能力知识的情况下自适应剪枝比率和每个设备的 LoRA 维数。
- 实现对 LoRA 更新的异质性感知加权聚合,以适应具有不同容量的设备。
- 定义一个将损失下降、剪枝进度和延迟偏差结合的奖励函数,以指导 MAB 的决策。
- 提供基于 LoRA 梯度的剪枝判据以及分组级重要性聚合,以确定需要剪除的参数。
实验结果
研究问题
- RQ1如何在资源受限设备上进行高效的联邦微调而不牺牲准确性?
- RQ2自适应剪枝和自适应 LoRA 维数分配是否能缓解联邦 LLM 微调中的设备异质性和瓶颈问题?
- RQ3在联邦、设备多样的 setting 下,联合迭代剪枝与微调对推理效率和任务准确性的影响如何?
主要发现
- 与在相同稀疏度下的基线相比,FedSpine 将微调速度提升 1.4× 至 6.9×。
- 在相同稀疏度下,FedSpine 能将最终准确性提高 0.4% 至 4.5%。
- 一种基于在线 MAB 的算法,具备对臂持续处理能力(S-UCB),无需先验设备知识即可有效分配剪枝比率和 LoRA 维数。
- 在 80 台 NVIDIA Jetson 设备上的实验证明所提方法在提高效率的同时也能提升准确性。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。