LCSB: 用于设备端大语言模型微调的内存高效层循环选择反向传播
LCSB: Layer-Cyclic Selective Backpropagation for Memory-Efficient On-Device LLM Fine-Tuning
AI总结:
LCSB通过选择性梯度计算提升设备端大语言模型微调的效率和稳定性。
摘要:
内存高效的反向传播(MeBP)已经使在少于1GB内存的移动设备上实现大语言模型(LLMs)的一阶微调成为可能。然而,MeBP在每一步都需要通过所有transformer层进行反向计算,其中仅权重解压就占反向计算时间的32-42%。我们提出了层循环选择反向传播(LCSB),每一步仅计算部分层的梯度。我们的关键发现是残差连接保证了梯度通过身份路径流动,而AdamW动量为未选中的层提供隐式的更新。我们将LCSB解释为LoRA参数空间上的块坐标下降法,为收敛提供了理论依据。LCSB在五个模型和三个任务上实现了高达1.40倍的速度提升,同时质量下降小于2%。令人惊讶的是,在4位量化设置中,LCSB表现出更稳定的性能:一个在完整反向传播下完全发散的3B模型在LCSB下能够平稳收敛,这表明了从选择性梯度计算中隐含的正则化效应。
英文摘要:
Memory-efficient backpropagation (MeBP) has enabled first-order fine-tuning of large language models (LLMs) on mobile devices with less than 1GB memory. However, MeBP requires backward computation through all transformer layers at every step, where weight decompression alone accounts for 32--42% of backward time. We propose Layer-Cyclic Selective Backpropagation (LCSB), which computes gradients for only a subset of layers per step. Our key insight is that residual connections guarantee gradient flow through identity paths, while AdamW momentum provides implicit updates for non-selected layers. We interpret LCSB as Block Coordinate Descent on the LoRA parameter space, providing theoretical justification for convergence. LCSB achieves up to 1.40$\times$ speedup with less than 2\% quality degradation across five models and three tasks. Surprisingly, in 4-bit quantized settings, LCSB exhibits superior stability: a 3B model that completely diverges under full backpropagation converges smoothly with LCSB, suggesting an implicit regularization effect from selective gradient computation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。