arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.15520cs.LGcs.DC
收藏

MobiZO:通过推理引擎实现边缘端高效的大语言模型微调

MobiZO: Enabling Efficient LLM Fine-Tuning at the Edge via Inference Engines

University of Southern California(南加州大学)

Lei Gao, Amir Ziashahabi, Yue Niu, Salman Avestimehr, Murali Annavaram

AI总结:

MobiZO提出一种面向边缘设备的资源高效大语言模型微调框架,通过并行化零阶梯度估计、多重扰动LoRA模块以及与ExecuTorch推理引擎的无缝集成,在提升微调精度的同时实现显著加速和内存节省。

摘要:

大语言模型(LLMs)目前在大规模云服务器上进行预训练和微调。下一个前沿领域是LLM个性化,即基础模型可以利用用户或任务特定的数据进行微调。鉴于此类私人数据的敏感性,在边缘设备上微调这些模型以提高用户信任度是可取的。然而,由于巨大的内存和计算需求以及有限的基础设施支持,在资源受限的边缘设备上进行微调面临重大挑战。我们观察到,推理引擎(例如ExecuTorch)可以通过利用零阶(ZO)优化重新用于微调,该优化使用多次前向传播来近似梯度。尽管前景广阔,但由于精确梯度估计所需的多次前向传播计算成本高昂,在边缘设备上直接应用ZO方法效率低下,并且其实际部署在很大程度上尚未被探索。我们提出了MobiZO,这是一个专门为边缘设备设计的资源高效的大语言模型微调框架。MobiZO结合了三项关键创新:(1)一种并行化随机梯度估计器,采用外循环和内循环并行来消除顺序前向传播;(2)一种专用的多重扰动LoRA(MP-LoRA)模块,能够高效实现内循环和外循环并行;(3)与ExecuTorch无缝集成以进行端侧训练,无需修改运行时。实验表明,MobiZO在提高微调精度的同时,实现了显著的运行时加速和内存节省,为LLM在实时端侧应用中的实际部署铺平了道路。

英文摘要:

Large Language Models (LLMs) are currently pre-trained and fine-tuned on large cloud servers. The next frontier is LLM personalization, where a foundation model can be fine-tuned with user/task-specific data. Given the sensitive nature of such private data, it is desirable to fine-tune these models on edge devices to improve user trust. However, fine-tuning on resource-constrained edge devices presents significant challenges due to substantial memory and computational demands, as well as limited infrastructure support. We observe that inference engines (e.g., ExecuTorch) can be repurposed for fine-tuning by leveraging zeroth-order (ZO) optimization, which uses multiple forward passes to approximate gradients. While promising, direct application of ZO methods on edge devices is inefficient due to the high computational cost of multiple forward passes required for accurate gradient estimation, and their deployment has been largely unexplored in practice. We introduce MobiZO, a resource-efficient fine-tuning framework for LLMs specifically designed for edge devices. MobiZO combines three key innovations: (1) a parallelized randomized gradient estimator that employs both outer-loop and inner-loop parallelism to eliminate sequential forward passes, (2) a specialized Multi-Perturbed LoRA (MP-LoRA) module that enables efficient realization of both inner and outer loop parallelism, and (3) a seamless integration with ExecuTorch for on-device training, requiring no modifications to the runtime. Experiments demonstrate that MobiZO achieves substantial runtime speedups and memory savings while improving fine-tuning accuracy, paving the way for practical deployment of LLMs in real-time, on-device applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑