arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.03425cs.LG
收藏

面向资源受限移动设备的大语言模型微调内存高效反向传播方法

Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devices

Apple(苹果公司)

Congzheng Song, Xinyu Tang

AI总结:

针对移动设备上LLM微调内存不足的问题,提出内存高效反向传播方法MeBP,在内存与速度间取得更优平衡,可在1GB内存内完成0.5B-4B规模LLM微调,并开源实现。

摘要:

使用反向传播对大语言模型(LLM)进行微调——即便仅针对LoRA这类参数子集——的内存消耗可能远高于推理,通常被认为在资源受限的移动设备上不具备可行性。零阶优化(ZO)这类替代方法可大幅降低内存占用,但代价是模型收敛速度显著变慢(所需步数是反向传播的10倍到100倍)。我们提出了一种适用于移动设备的内存高效反向传播实现方案(MeBP),可在内存占用与计算时间之间取得更优的权衡,同时收敛速度更快、性能表现优于ZO基线。我们在iPhone 15 Pro Max上验证了MeBP的有效性,结果表明参数量从0.5B到4B不等的各类LLM都可在不足1GB内存的条件下完成微调。我们在https://github.com/apple/ml-mebp 发布了MeBP的实现示例。

英文摘要:

Fine-tuning large language models (LLMs) with backpropagation\textemdash even for a subset of parameters such as LoRA\textemdash can be much more memory-consuming than inference and is often deemed impractical for resource-constrained mobile devices. Alternative methods, such as zeroth-order optimization (ZO), can greatly reduce the memory footprint but come at the cost of significantly slower model convergence (10$\times$ to 100$\times$ more steps than backpropagation). We propose a memory-efficient implementation of backpropagation (MeBP) on mobile devices that provides better trade-off between memory usage and compute time, while converging faster and achieving better performance than the ZO baseline. We verify the effectiveness of MeBP on an iPhone 15 Pro Max and show that various LLMs, ranging from 0.5B to 4B parameters, can be fine-tuned using less than 1GB of memory. We release an example of the MeBP implementation at https://github.com/apple/ml-mebp.

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

↑